我有以下代码:
<?php
include "../../koneksi.php";
$module=$_GET['module'];
$act=$_GET['act'];
$Gfile_id=$_GET['file_id'];
if ($module=='galleryPhoto' AND $act=='delete'){
$del=mysql_query("DELETE FROM gallery_photo WHERE file_id='$Gfile_id'");
header("location:../?v=gallery_foto&info=Success");
}
?>
我可以删除数据库行,但不能删除目录中的图像。如何从目录中删除图像?
最佳答案
你可以使用 unlink() 函数
关于PHP : How to remove images in the directory of my website using PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26836331/