UID93289
帖子
精華
主題
積分417
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限5
註冊時間2008-6-22
在線時間 小時
最後登錄1970-1-1
該用戶從未簽到
|
我使用的資料庫
appserv-win32-2.5.9使用的語言編碼
UTF-8
但是無法顯示人數
http://20.hopto.org/PRR/
<?PHP
$title = "首頁";
require './inc/header.inc';
echo ("<TABLE align='center'>");
error_reporting(0);
$IP = array("<font size=-2>登陸伺服器:" => "".$loginip.":".$loginport."","<font size=-2>人物伺服器:" => "".$charip.":".$charport."","<font size=-2>地圖伺服器:" => "".$mapip.":".$mapport."",);
while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
echo("<TD><DIV>".$ServerName."</DIV></TD><TD>");
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo("<DIV style=\"color:'green'\"><font size=-2>正常在線</DIV>");
fclose($fp); }else{ echo("<DIV style=\"color:'red'\"><font size=-2>未知狀態</DIV>");} echo ("</TD></TR><TR>");}
$usergs1 = 0;$res = mysql_query("SELECT user FROM `sstatus`");$row = mysql_fetch_array($res);$usergs1 = $row[user];
if($usergs1 == 0) {$usergs2 = '不顯示'; } else { $usergs2 = $usergs1; }
echo ("<tr><td><font size=-3> 在線人數: </td><td><font size=-2 color=blue>".$usergs2."</font></td></tr>");
echo ("</TABLE>");
require './inc/indexfooter.inc';
?>
請問這段要怎麼改成顯示呢
[ 本帖最後由 a20080001 於 2009-1-4 01:41 PM 編輯 ] |
評分
-
查看全部評分
|