麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
有人愿意帮我看看这段程序吗?我调试不出来
悬赏分:20 - 2007年08月15日

下面这段程序是显示程序,我在自己机子上调试,结果整个页面空无一物。不知怎么回事。请高手指点。 [php] <?php session_start(); include("lang/get_microtime.php"); if(session_is_registered(count)==false){ $count_add=1; session_register(count); }else{$count_add=0;} include("config.php"); $uprid=intval($_GET['uprid']); $myconn=mysql_connect("$db_host","$db_user","$db_password"); mysql_select_db("$db_name",$myconn); $sql = "select * from cnupr_news where id=$uprid && show='1'"; $result =mysql_query($sql); $arti= mysql_fetch_array($result); if($arti){ //如果查询结果存在,显示查询结果 $artid= $arti["id"]; $arttitle= $arti["title"]; $artauthor= $arti["author"]; $artsource= $arti["source"]; $artbsort= $arti["bsort"]; $artssort= $arti["ssort"]; //在cnupr_sort表查询一级分类 $sql2 = "select sortname from cnupr_sort where sortid=$artbsort"; $result2 = mysql_query($sql2); $bsort= mysql_fetch_array($result2); if($bsort){ $bsortname=$bsort["sortname"]; } //在cnupr_sort表查询二级分类 $sql3 = "select sortname from cnupr_sort where sortid=$artssort"; $result3 = mysql_query($sql3); $ssort= mysql_fetch_array($result3); if($ssort){ $ssortname=$ssort["sortname"]; } //在cnupr_news表中查询同二级分类最新文章 $sql4 = "select sortname,date from cnupr_news where ssort=$artssort order by id desc"; $result4 = mysql_query($sql4); //在cnupr_news表中查询同二级分类最热文章 $sql5 = "select sortname,date from cnupr_news where ssort=$artssort order by visitnum desc"; $result5 = mysql_query($sql5); //处理文字,将数据库中的格式转化成网页格式 $artcontent= $arti["content"]; $content= htmlspecialchars($artcontent); $content= str_replace(" ","  ",$content); $content= nl2br($content); $content= str_replace("\t"," ",$content); $content= str_replace("\r","",$content); $artdate=$arti["date"]; //处理阅读次数,加1后存入数据库 $artvisitnum=$arti["visitnum"]; $artvisitnum++; UPDATE `cnupr_news` SET `visitnum` = '$artvisitnum' WHERE `id` = '$artid'; //关闭数据库 mysql_close($myconn); ?> <?php include("lang/head.php"); ?> <?php include("lang/top.php"); ?>
  您现在的位置是: <?php echo "".$sitename." >> ".$bsortname." >> ".$ssortname.""; ?> <?php include("lang/date.php"); ?>
<?php echo $arttitle; ?>
<?php echo $sitename."  加入时间  ".$artdate."  作者  ".$artauthor."  来源  ".$artsource."  阅读次数  ".$artvisitnum ; ?>
<?php echo $content; ?>
<?php for($i=0;$i<10;$i++){ $sortnew= mysql_fetch_array($result4); echo""; } ?> <?php for($i=0;$i<10;$i++){ $sorttop= mysql_fetch_array($result5); echo""; } ?>
同类最新文章
"; echo"".$sortnew["title"]."  ".$sortnew["date"]; echo "
同类热门文章
"; echo"".$sorttop["title"]."  ".$sorttop["date"]; echo "
<?php include("lang/bottom.php"); ?> <?php }else { echo("<script>window.location.href=\"error.php\"</script>"); } ?> [/php]

提问者:rxyin   08-15 13:01
答复
路过。。。顺便帮顶:)
回答者:玉米づ冰冻可乐 - 瓦岗村民 8-22 09:10
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
39 + 23 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM