$sql = mysql_query("SELECT id, username, firstname,lastname, country, trade FROM myMembers WHERE email_activated='1' ORDER BY id ASC");
$sql2 = mysql_query("SELECT id, username, firstname,lastname, country, trade FROM mymembers WHERE email_activated='1' ORDER BY id DESC $limit");
$paginationDisplay = "";
if ($lastPage != "1"){
$paginationDisplay .= 'Page <strong>' . $pn . '</strong> of ' . $lastPage. '<img src="images/clearImage.gif" width="48" height="1" alt="Spacer" />';
if ($pn != 1) {
$previous = $pn - 1;
$paginationDisplay .= ' <a href="' . $_SERVER['PHP_SELF'] . '?pn=' . $previous . '"> Back</a> ';
}
$paginationDisplay .= '<span class="paginationNumbers">' . $centerPages . '</span>';
if ($pn != $lastPage) {
$nextPage = $pn + 1;
$paginationDisplay .= ' <a href="' . $_SERVER['PHP_SELF'] . '?pn=' .$nextPage . '"> Next</a> ';} }
$outputList = '';
while($row = mysql_fetch_array($sql2)) { $id = $row["id"];
$username = $row["username"];
$firstname = $row["firstname"];
$lastname = $row["lastname"];
$country = $row["country"];
$trade=$row["trade"];
$check_pic = "members/$id/image01.jpg";
$default_pic = "members/0/image02.jpg";
if (file_exists($check_pic)) {
$user_pic = "<img src="$check_pic" width="150px"; height="150px"; />"; } else {
$user_pic = "<img src="$default_pic" width="150px" height="150px"; />"; // forces default picture to be 120px wide and no more}
$name=$firstname.' '.$lastname;
$outputList .= '<div id="content" class="clearfix"><section id="left"><div id="userStats class="clearfix"><div class="pic">
<a href="profile.php?id=' . $id . '" target="_self">' . $user_pic . '</a></div><div class="data">
<h1><a href="profile.php?id=' . $id . '" target="_self">' . $name. '</a></h1>
<h3>From: ' . $country .'<h3>
<h3>Trade: ' . $trade .'<h3>
<h3>Username: ' . $username .'</h3>
<div class="sep"></div>
<ul class="numbers clearfix">
<li><a href="profile.php?id=' . $id . '" target="_self">Full Profile</a></li>
<li><a href="info.php?id=' . $id . '" target="_self">About</a></li>
<li><a href="blab.php?id=' . $id . '" target="_self">WhiteBoard</a></li>
</ul></div></div></section></div><br>';}
此代码在localhost中工作,但不在部署的服务器中工作。在测试服务器上的php文件中出现错误,但在本地主机中没有错误
这是用户登录后所指向的页面。在服务器上的错误是这样的: 解析错误:语法错误,在/home/u576778821/public_html/interact/index.php意外T_VARIABLE 119线上
,其中119线是这个
$user_pic = "<img src="$check_pic" width="150px"; height="150px"; />";
而现在我正在使用免费的azuka.biz服务器。
你确定这是在本地主机上工作?连接错误应该在本地主机上抛出一个错误 –
是的,这是在localhost队友工作... Idk如何 –