嗨,你能帮忙吗,我正在网站内使用 php(我的第一次请温柔)建立一个网站,我将图像上传到服务器,到一个名为 inventory_images 的文件,它正在调整大小,所以我最终得到了两个图像 img01.jpg 和 resized_img01.jpg 我使用小的前端来加速加载,当观众希望看到完整尺寸的图像时,我使用大的。
我使用下面的代码,
// unlink the image from server
// Remove The Pic -------------------------------------------
$pictodelete = ("../inventory_images/$id_to_delete.jpg");
if (file_exists($pictodelete)) {
unlink($pictodelete);
}
header("location: inventory_list.php");
exit();
要从库存图像文件中删除图像,我怎样才能删除也取出调整大小的文件,所以两者都被删除。