网页服务器和主机的关系,差异网页本地主机和主机服务器

上我有一个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);

?>

$count=0;

while($row = mysql_fetch_array($result))

{

$id= $row['ARTICLE_ID'] ;

$title= $row['TITLE'] ;

$content= $row['CONTENT'] ;

$count=$count+1;

if(strlen($content)< 110)

{

$content=substr($content,0,strlen($content));

}

else

{

$content=substr($content,0,100);

}

$postedon=$row['POSTED_ON'] ;

$author = $row['POSTED_BY'] ;

?>

<?php echo $title ; ?>

account.png<?php echo $author ; ?>clock.png<?php echo $postedon ; ?>folder.pngGeneral
<?php echo $content ;?>

}

?>

//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错误日志? –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值