请提出一些想法。如何解决错误?
echo "<td class='bold'>Race Category<span class='star'>*</span></td>";
$array_all=array('name'=>'race_category','value'=>$s_race_category,'type'=>'RACE_CATEGORY','style'=>"class='selectbox'",'javascript'=>'','default'=>'');
echo "<td>";
echo $this->model_students->getAll($array_all);
echo "</td>";
错误:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: s_race_category
Filename: templates/forms.php
Line Number: 46
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: s_programme
Filename: templates/forms.php
Line Number: 124
答案 0 :(得分:0)
严重性说“通知”,这意味着它们不会破坏您的页面,但它们表示其他内容。在这种情况下,您可能在使用它们之前没有定义它们。
尝试为变量赋值,如:
$s_race_category = "";
$s_programme = "";
由于PHP错误报告级别,您看到这些通知,您可以阅读更多相关信息here