unlink不工作 [英] unlink not working

查看:27
本文介绍了unlink不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆