我收到一個未定義的變量錯誤,我試圖添加var $nx = '';
但這並沒有幫助。我錯過了什麼嗎? 注意:未定義的變量:NX在/home/social/public_html/kernel/parser.php在線55試圖定義一個,未定義的變量錯誤
while (!feof($f)) {
$s = chop(fgets($f,4096));
if ($s == '') continue;
if (substr($s,0,5) == '<!--[') {
if ($nx != '') $this->templ[] = $nx;
$this->templ[] = $s;
$nx = '';
}
elseif (substr($s,0,5) == '<?php') {
if ($nx != '') $this->templ[] = $nx;
$nx = $s;
}
else
////// LINE 55 $nx .= ($nx != '' ? "\n" : '').$s;
if (substr($nx,-2) == '?>') {
$this->templ[] = $nx;
$nx = '';
}
}
你在哪裏放$ NX = 「」? – kukipei 2012-01-14 09:43:52
位於文件頂部,其中定義了其他幾個var – acctman 2012-01-14 09:46:12