更新时间:2023-02-26 13:36:08
您将必须使用服务器上的路径来删除图像,而不是url.
You'll have to use the path on your server to delete the image, not the url.
unlink('/var/www/test/folder/images/image_name.jpeg'); // correct
您应该在unlink()
之前删除@
,在这种情况下,您会看到错误消息,提示找不到文件"或类似的内容.
you should remove the @
before unlink()
, in that case you would have seen the error-message saying "file not found" or something like that.