apache禁止操作根目录以外的位置怎么弄?怎么设置apache 让程序只能操作本程序根目录以内的文件。现在用file_put_contents之类的文件操作方法可以操作根目录以外的文件。
北风网解答:
修改配置信息
httpd.conf配置
DocumentRoot "E:\php\web\php\qddd"
ServerAlias *.w30.com
php_admin_value open_basedir e:/temp/;E:/php/web/php/qddd/
php.ini配置
upload_tmp_dir ="e:\temp"
session.save_path = "e:\temp"
本文来自:http://bbs.ibeifeng.com/read-htm-tid-65309.html
更多web前端开发问题解决:http://bbs.ibeifeng.com/thread-htm-fid-150.html
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29511780/viewspace-1156089/
,如需转载,请注明出处,否则将追究法律责任。