【问题标题】:Notice: Undefined index: page in注意:未定义索引:page in
【发布时间】:2015-01-19 09:21:50
【问题描述】:

我在我的 wordpress 网站的后端收到此通知 注意:未定义索引:第 17 行 /customers/f/e/4/pointdevue-plus.be/httpd.www/wp-content/themes/SliderResponsiveTheme/settings.php 中的页面 当我查看第 17 行时,我看到了以下代码: (从第 14 行到第 21 行)

);
function mytheme_add_admin() {
    global $themename, $shortname, $settings_list;
    if ( $_GET['page'] == basename(__FILE__) ) {
    
        if ( 'save' == $_REQUEST['action'] ) {
                  foreach($settings_list as $value) {
                    //echo '<script type="text/javascript">alert("' . $value . '");</script>';

有人知道到底出了什么问题以及如何解决这个问题吗?

谢谢!

【问题讨论】:

    标签: indexing themes undefined


    【解决方案1】:

    isset测试密钥是否存在:

    if (isset($_GET['page']) && $_GET['page'] == basename(__FILE__) ) {
        ^^
    

    【讨论】:

      猜你喜欢
      • 2015-12-01
      • 2013-11-27
      • 2015-06-02
      • 2021-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多