Aug
31
Notice: Undefined variable: action 解决
搜索
我已经获得阿里云幸运券,准备分享给您。请点击获取
Notice: Undefined variable: action 以前以为是没有定义,于是通过$action = $_GET['action'] 发现还是不行
原来在php.ini 下配置一下就可以了:
修改 PHP.INI, 将 error_reporting 设置为 error_reporting = E_ALL ~ E_NOTICE
重启 APACHE 服务
如果不想改。。也不一定要改php.ini
只要在开头加一句
error_reporting(E_ALL ^ E_NOTICE); 也可以