Home  >  Article  >  Backend Development  >  禁用COPY、UNLINK的情况下,怎样修改服务器的文件?解决办法

禁用COPY、UNLINK的情况下,怎样修改服务器的文件?解决办法

WBOY
WBOYOriginal
2016-06-13 11:50:261007browse

禁用COPY、UNLINK的情况下,怎样修改服务器的文件?
我自己编写的php文件,当中的copy ,unlink、move_uploaded_files是会被服务器禁止的;
但是服务器中有些PHP脚本有上面的操作却可以正常运行。这是为什么?
这样的环境下,怎样修改服务器中的文件(普通文件,如JPG)?
------解决方案--------------------
关闭危险函数:
disable_functions = chdir,chroot,dir,getcwd,opendir,readdir,scandir,fopen,unlink,delete,copy,mkdir,   rmdir,rename,file,file_get_contents,fputs,fwrite,chgrp,chmod,chown
------解决方案--------------------
如果是在配置文件里面禁用了这些函数,则整个站点都不能使用这些函数,不存在有些文件可用,有些不可用。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn