本文主要对 PHP 中的 disable_functions 以及一些可能会遭到利用的函数做一个罗列。
- 常见禁用的函数
disable_functions =eval,shell_exec,exec,passthru,system,chroot,chgrp,chown,proc_open,proc_get_status,error_log,popen,ini_alter,ini_restore,dl,pfsockopen,readlink,symlink,popepassthru,putenv,stream_socket_server,mail,pcntl_exec,mb_send_mail,ignore_user_abort,link,map_open,imap_mail
另外用于nextcloud需要的功能而不能禁用的有
scandir,openlog,syslog,assert,set_time_limit
fresshrss不能禁用的有
ini_set
参考资料:
- https://www.codeleading.com/article/6453761157/
- https://zhuanlan.zhihu.com/p/94783044