我知道这是一个非常常见的问题,但看在上帝的份上,我在我的 php 代码中找不到错误。我得到的错误是:
Parse error: syntax error, unexpected T_VARIABLE in ..\virus_scan.php on line 24
希望一些新鲜的眼睛会带来新的视角并帮助我识别错误。第 24 行是声明 $sql 变量的行:
if ($dbs === False)
{
print "can't find $database";
}
//--------------------------------------------------------------------------
// 2) Query database for data
//--------------------------------------------------------------------------
$sql = "select unix_timestamp(date(Date_Found)) * 1000 as day, count(Virus_Name) as nb from machine_virus_info where Virus_name!='NULL' group by unix_timestamp(date(Date_Found)) * 1000 ;"
$result = mysql_query($sql) or die('SQL Error 1: ' . mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$array[] =
array (
$row['day'],
$row['nb']
);
}