急,.! PHP的一个问题! 在线等!

来源:百度知道 编辑:UC知道 时间:2024/05/11 05:25:05
下面这个是哪错了?我怎么调用不了!

function narrowboximg($tid,$cnt,$upcnt){
$downcnt=$cnt-$upcnt;
$link=mysql_connect($GLOBALS["cfg_dbhost"],$GLOBALS["cfg_dbuser"],$GLOBALS["cfg_dbpwd"]);
$dbname=$GLOBALS["cfg_dbname"];
$dbprefix=$GLOBALS["cfg_dbprefix"];
mysql_query("SET NAMES gb2312");
$sql="select * from ".$dbname.".".$dbprefix."archives where typeid=".$tid." order by id desc limit 0,$cnt";
$rs=mysql_query($sql);

$sql="select * from ".$dbname.".".$dbprefix."archives where typeid=".$tid." and litpic!='' order by id desc limit 0,1";
$rspic=mysql_query($sql);

$picpath="/img/nopic.jpg";
$pica="#";
$picid="NA";
if($rspic){
if($row=mysql_fetch_array($rspic)){
$arc=new Archives($row["ID"

没学过啊,看不懂。去这里看看
那里全是高手http://club.21php.com/index.php?s=f5bc00d5682fdc5fae609a56af7661e3&