unlink不工作 [英] unlink not working
问题描述
我是php的新手。我试图从服务器中删除一个文件,我把它放在那里(一个文件,而不是整个目录)。我正在使用unlink($ filename);
我将路径作为相对路径如下:
... / images / 6 / image_001。 JPG
我做了一个scandir
$ files = scandir(" ../ images / 6");
print_r($ files);显示该文件是存在的文件之一。
关于这是一个保护问题的可能性(尽管它不应该是,
当我把它放在第一位时),我做了一个
chmod($ filename,777);
文件没有'' t从服务器删除。任何想法?
谢谢!
filename);
我把路径作为相对路径如下:
... / images / 6 / image_001.JPG
我做了一个scandir
files = scandir(" ../ images / 6");
print_r(
文件);显示该文件是存在的文件之一。
关于这是一个保护问题的可能性(尽管它不应该是,
当我把它放在首位时),我做了一个
chmod(
I''m a newbie to php. I am trying to delete a file from the server that I put
there (one file, not the whole directory). I am using unlink ($filename);
I did the path as a relative path as follows:
.../images/6/image_001.JPG
I did a scandir
$files = scandir("../images/6");
The print_r ($files); shows that the file is one of the files present.
On the possibility that it''s a protection problem (though it shouldn''t be,
as I put it there in the first place), I did a
chmod($filename, "777");
The file doesn''t delete from the server. Any ideas?
Thanks!
filename);
I did the path as a relative path as follows:
.../images/6/image_001.JPG
I did a scandir
files = scandir("../images/6");
The print_r (
files); shows that the file is one of the files present.
On the possibility that it''s a protection problem (though it shouldn''t be,
as I put it there in the first place), I did a
chmod(
这篇关于unlink不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!