欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

php Yii: 出现undefined offset 或者 undefined index解决方案

程序员文章站 2022-05-06 19:52:20
...

exec()函数无法使用 程序报错:Warning:exec()hasbeendisabledforsecurityreasonsin 原因:在 php .ini中存在disable_functions配置,默认配置中,cli执行函数都是被禁止的,如果需要的话,需要在php.ini中将disable_functions=exec,popen,system….,将你需

exec()函数无法使用

程序报错:Warning: exec() has been disabled for security reasons in

原因:在php.ini中存在 disable_functions配置,默认配置中,cli执行函数都是被 禁止的,如果需要的话,需要在php.ini中将 disable_functions = exec , popen, system …. ,将你需要执行的函数从列表中删掉在重启apache即可 。

完全是配置的问题。

php-apache2handler.ini

php.ini

disable_functions = proc_open, popen, exec, system, shell_exec, passthru