如标题提问,错误提示如下:
Warning: The magic method __get() must have public visibility and cannot be static in D:\xampp\htdocs\class\Page.php on line 41Notice: A session had already been started - ignoring session_start() in D:\xampp\htdocs\index.php on line 13Notice: Use of undefined constant g_S_name - assumed 'g_S_name' in D:\xampp\htdocs\index.php on line 14Notice: Undefined index: g_S_name in D:\xampp\htdocs\index.php on line 14

解决方案 »

  1.   

    D:\xampp\htdocs\class\Page.php
    问题出在这个文件的41行的函数声明代码
    你需要把 
    private static function __get() // 类似这样
    public function __get() // 改成这样
      

  2.   

    Warning: The magic method __get() must have public visibility and cannot be static in D:\xampp\htdocs\class\Page.php on line 41
    魔术方法__get()必须具备public属性,在D:\xampp\htdocs\class\Page.php第41行
    修改成public function __get()或function __get()
     
    Notice: A session had already been started - ignoring session_start() in D:\xampp\htdocs\index.php on line 13
    D:\xampp\htdocs\index.php第13行,session会话已经被启动了,你就别再次启动了.
     
    Notice: Use of undefined constant g_S_name - assumed 'g_S_name' in D:\xampp\htdocs\index.php on line 14
    D:\xampp\htdocs\index.php 第 14行,有变量没有定义
     
    Notice: Undefined index: g_S_name in D:\xampp\htdocs\index.php on line 14
    D:\xampp\htdocs\index.php的14行数组的索引没有定义