php下重命名目录失败的问题

WBOY
Release: 2016-06-06 20:52:26
Original
1032 people have browsed it

环境win7,服务器iis,刚发现

Copy after login
Copy after login

使用mkdir能创建文件夹,但是rename却无法重命名目录(文件重命名可以),另外rmdir也貌似没效果。
不知道是什么问题?权限?还是语法有误?

回复内容:

环境win7,服务器iis,刚发现

Copy after login
Copy after login

使用mkdir能创建文件夹,但是rename却无法重命名目录(文件重命名可以),另外rmdir也貌似没效果。
不知道是什么问题?权限?还是语法有误?

问题出在权限,文件夹对用户没有修改权限,因此函数执行之后返回false。我用的解决方法是直接整个父文件夹的权限设置对用户为可修改,然后可以了。……不过我还有个小疑问,这样设置安全性是否也随之而来?……自问自答了呃。

Related labels:
php
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!