一.  php配置 
1.禁止一些函数
disable_functions = eval,assert,popen,passthru,escapeshellarg,escapeshellcmd,passthru,exec,system,chroot,scandir,chgrp,chown,escapeshellcmd,escapeshellarg,shell_exec,proc_get_status,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,leak,popepassthru,stream_socket_server,popen,proc_open,proc_close

2. 配置error_log
display_errors=off
log_errors=on
error_log=/path/to/logfile
error_reporting = E_ALL | E_STRICT
   


3. 配置open_basedir
php.ini: open_basedir = /dir1/:/dir2
httpd.conf: php_admin_value open_basedir "/dir1/:/dir2/"

如果有多个站点的话,建议在虚拟主机配置文件中配置open_basedir。

相关文章:

  • 2021-12-03
  • 2021-06-16
  • 2021-09-22
  • 2021-06-29
  • 2022-12-23
  • 2022-01-04
  • 2021-06-11
  • 2021-09-27
猜你喜欢
  • 2021-09-18
  • 2021-08-30
  • 2022-02-27
  • 2021-08-21
  • 2022-12-23
  • 2021-12-17
  • 2022-01-30
相关资源
相似解决方案