我在第 445 行收到意外T_variable,但我看不到问题所在,任何人都可以看到导致此错误的问题所在吗?
//start:procedure
$img_result = '';
if(empty($arrImageFile[$key])){
$img_result = ' ';
}else{
$img_$result .= '<ul class="qandaul"><li>'; //line 445
if(is_array( $arrImageFile[$key] )){
foreach($arrImageFile[$key] as $filename){
$img_$result.= CreateLink($filename, "image");
}
}else{
$img_$result.= CreateLink($arrImageFile[$key], "image");
}
$img_result.= '</li></ul>';
}
//end:procedure
echo '<td width="11%" class="imagetd">'.$img_result.'</td>' . PHP_EOL;
$img_$result
应该是:$img_result
,这也应该固定在第448和451行。请记住,T_VARIABLE
通常是指$
变量符号。如果要使用变量的变量特征,则应使用$$img_result
或${$img_result}
以便更好地理解。