上我有一个PHP的简单的HTML页面,如下所示:差异网页本地主机和主机服务器
Articles 'n' More::Articles
| $articlePerPage="10"; $subcatID = $_GET['subcatid']; $curPageId = $_GET['pageId']; $nextPageId=$curPageId+1; $prevPageId=$curPageId-1; $con=mysql_connect('localhost','root',''); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("articles_db",$con); $query=""; $queryCount=""; if($subcatID == "0") { $queryCount="select count(1) total from tbl_articles"; //echo "QueryCount is".$queryCount; } else { $queryCount="select count(1) total from tbl_articles where SUBCATEGORY_ID=".$subcatID; } $resultCount= mysql_query($queryCount); $rowCount = mysql_fetch_array($resultCount); $totlaArticles= $rowCount['total'] ; //echo 'total articles'.$totlaArticles; if($subcatID == "0") { $query="select * from (SELECT ARTICLE_ID,TITLE,CONTENT,POSTED_ON,POSTED_BY FROM TBL_Articles order by POSTED_ON desc limit ".$articlePerPage*$curPageId.") sub order by POSTED_ON asc limit ".$articlePerPage; //echo $query; } else { $query="select * from (SELECT ARTICLE_ID,TITLE,CONTENT,POSTED_ON,POSTED_BY FROM TBL_Articles where SUBCATEGORY_ID=".$subcatID." order by POSTED_ON desc limit ".$articlePerPage*$curPageId.") sub order by POSTED_ON asc limit ".$articlePerPage; } $result = mysql_query($query); ?>
} ?> | |||||||||||
//echo $subcatID; //echo ("Previous"); if($curPageId>1) { echo ("Previous"); //echo ("Previous"); } ?> | if($totlaArticles/($curPageId*10)>1) { echo ("Next"); //echo "Next" } ?> |
count is : <?php echo $count; include("Footer.php"); ?>
本页面给出了当我尝试它我的本地机器上所期望的结果。 但是,当我把它上传到我的主机服务器,我面临着以下问题:
这表明只有前3(在网页上没有滚动条)的文章中相应部分,在那里为我的本地机器上显示所有的文章用滚动条。
不包括footer.php
不显示背景色
设置我试图设置边框的表,但它不会显示任何边界上
我的本地机器我有XAMPP(Basispaket)版本1.7.4与PHP 5.3.5和服务器我有版本5.2.6(作为CGI应用程序运行)
是否有任何人有我关于为什么我面临这个问题,以及可能的解决方案是什么。
2011-11-22
Mohit
+0
很多事情都可能导致这种情况。你有没有检查你的服务器的PHP错误日志? –