帮助中心 >  技术知识库 >  云服务器 >  服务器教程 >  php开启open_basedir防跨站保护及禁用函数执行disable_functions提高系统安全

php开启open_basedir防跨站保护及禁用函数执行disable_functions提高系统安全

2019-10-30 05:11:23 145

如果你安装的本站的kangle和ep,那么默认这两个参数已经打开,如果你用的官方默认的脚本安装的。那么你需要编辑

linux目录是/vhs/kangle/ext/*php*目录下的php-templete.ini文件

windows是你的kangle安装目录下的/ext/*php*目录下的php-templete.ini文件

把php-templete.ini文件的;open_basedir和;;disable_functions,前面的;分号去掉,成这样。

php开启open_basedir防跨站保护及禁用函数执行disable_functions提高系统安全

禁止php访问系统函数

在disable_functions = 后面加上phpinfo,eval,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,disk_total_space, disk_free_space,chmod,closedir,copy,dir,escapeshellarg,escapeshellcmd,exec,fclose,fileperms,fopen,fread,fwrite,is_dir,link,mkdir,opendir,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,readdir,rename,rmdir,shell_exec,system,tempnam,touch,unlink;

保存即可如下图

php开启open_basedir防跨站保护及禁用函数执行disable_functions提高系统安全


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: