PHP 禁用 ni_set 之后 Laravel5.5 启动报错
php中禁用ini_set之后,访问首页报错
"ini_set() has been disabled for security reasons"
请问如何,在保持php.ini配置不变的情况下,使网站正常运行?
参考报错代码,设置为testing环境后,可以正常运行,但是其它环境受影响。
/www/htdocs/la-test/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
error_reporting(-1);
set_error_handler([$this, 'handleError']);
set_exception_handler([$this, 'handleException']);
register_shutdown_function([$this, 'handleShutdown']);
if (! $app->environment('testing')) {
ini_set('display_errors', 'Off');
}
}
推荐文章: