我最近尝试学习为我的自定义主题创建一个主题选项页面,这是按照stackoverflow和其他资源的教程进行的。但脚本显示错误
if ($_GET[\'page\'] == basename(__FILE__)) {
if (\'save\' == $_REQUEST[\'formaction\']) {
foreach ($options as $value) {
if( isset( $_REQUEST[ $value[\'id\'] ] ) ) {
update_option( $value[\'id\'], $_REQUEST[ $value[\'id\'] ] );
}
else {
delete_option( $value[\'id\'] );
}
}
foreach ($spawned_options as $value) {
if( isset( $_REQUEST[ $value[\'id\'] ] ) ) {
update_option( $value[\'id\'], $_REQUEST[ $value[\'id\'] ] );
}
else {
delete_option( $value[\'id\'] );
}
}
header("Location: themes.php?page=options.php&saved=true");
die;
}
else if(\'reset_all\' == $_REQUEST[\'formaction\']) {
foreach ($options as $value) {
delete_option( $value[\'id\'] );
}
foreach ($spawned_options as $value) {
delete_option( $value[\'id\'] );
}
header("Location: themes.php?page=options.php&".$_REQUEST[\'formaction\']."=true");
die;
}
}
我在这条线上出错了
if ($_GET[\'page\'] == basename(__FILE__)) {
if (\'save\' == $_REQUEST[\'formaction\']) {
错误消息显示“注意:未定义索引:第页…”和“注意:未定义索引:形式…”