This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
好吧,我是个傻瓜,发现发布的变量名称已更改,应该是“image”而不是“image_name”......
抱歉浪费你们的时间!
Ok I am a dumbass and found out that the posted variable name has changed and should have been 'image' instead of 'image_name'....
Sorry for wasting you guys' time!
@Rick:如果去掉警告抑制
@
,PHP 是否会返回访问被拒绝的错误消息?如果是这样,那就是问题所在。尝试@Rick: If you take out the warning-suppressing
@
, does PHP return an access denied error message? If so, that's the problem. Try正如其他人所说,您需要拥有适当的权限才能删除。具体来说,您需要写权限。试试这个:
As others are saying, you need to have proper permissions to delete. Specifically, you need write permission. Try this:
即使该文件存在,也不意味着您有权删除它。
您应该删除
@
运算符,它消除了潜在的错误——这可能非常有趣。And if you don't want error messages to be displayed to the user, you should :
display_errors
log_errors
和error_log
Even if the file exists, it doesn't mean you have the permissions to delete it.
You should remove the
@
operator, which is silencing a potential error -- which is probably quite interesting.And if you don't want error messages to be displayed to the user, you should :
display_errors
log_errors
anderror_log