PHP没法对父目录文件操作

WBOY
Release: 2016-06-13 10:37:42
Original
845 people have browsed it

PHP无法对父目录文件操作
$t = file_exists('../index.php');
结果为false
但是
$t = file_exists('index.php');

就是true的,很明显没有父目录权限,刚安装的wamp,不知道父目录权限是修改apache配置文件还是php.ini,又是改哪个位置的0和1吗,求指点,百度搜了好像也没有符合的答案..可能我用错关键字了

------解决方案--------------------
../是上层目录

什么都不带是当前目录...


------解决方案--------------------
./ 才表示当前目录。
而且windows下很少因为权限出问题
------解决方案--------------------
file_exist是文件是否存在。。存在返回true 不存在返回false 你看上层目录下有那个文件么。。
windows下修改权限右击属性中安全选项卡里

Related labels:
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
Popular Tutorials
More>
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!