0
可能重複:
What does the PHP error message 「Notice: Use of undefined constant」 mean?使用未定義的常量的不isset補救
我有 「使用未定義的常量的」 消息時加載這一功能:
function awp_get_options($i){
$i[selects][] = 'special_effects';
$i[radios][] = array('js_library','sack');
$i[selects][] = 'effects';
$i[checkboxes][] = 'no_load_library';
return $i;
}
我將它改爲:
function awp_get_options($i){
if(isset($i[selects])){
$i[selects][] = 'special_effects';
$i[selects][] = 'effects';
}
if(isset($i[radios]))
$i[radios][] = array('js_library','sack');
if(isset($i[radios]))
$i[checkboxes][] = 'no_load_library';
return $i;
}
它仍然說使用未定義的常量。如何更正此代碼?