PHP Parse error: syntax error, unexpected ',' in /home/xxx/public_html/xxxx/index.php on line 20我有一些HTML和PHP代碼中的一些錯誤
代碼:
<?php
$title = "Home";
$page = "index";
$return = TRUE;
require("./configuration.php");
include("./include.php");
$returned = @("harper");
if (($returned) != @("harper"))
{
exit("Error. Contact Us.");
}
$rows = ("SELECT * FROM `client` WHERE `clientid` = '".$_SESSION['clientid']."' LIMIT 1");
$result1 = ("SELECT `serverid`, `ipid`, `name`, `game`, `status`, `online`, `slots`, `type`, `port` FROM `server` WHERE `clientid` = '".$_SESSION['clientid']."' ORDER BY `serverid`");
$servers = array();
while ($rows1 = ($result1))
{
if (!empty($rows1['ipid']))
{
$rows2 = ("SELECT `ip` FROM `ip` WHERE `ipid` = '".$rows1['ipid']."' LIMIT 1");
$rows1 = ($rows1, $rows2);
}
($servers, $rows1);
}
1 part
你能解釋爲什麼你幾乎所有的東西都包含在括號內?在PHP中,這是不必要的,所以可能你有一點自己的方式。 – hakre