文章來源:https://www.onepound.cn/yc/?p=9257
最近剛買了一個新空間,網站上線后發現總是出現以下警告:
Warning: shell_exec() has been disabled for security reasons
in /home/shoesnba/public_html/redsoleshoeses.com/includes/functions/general.php on
line 1486。
意思是shell_exec()這個功能被禁用了,這一看就是配置問題,找到php.ini里面的
disable_functions = exec , popen, system …然后 把這個里面的exec去掉,最后在重啟下apache就好了
原因:在php.ini的 disable_functions配置中,默認exec執行函數都是被 禁止的,需要在php.ini中
disable_functions = exec , popen, system …. ,將你需要用的函數從列表中刪掉,然后在重啟apache就可以了