Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在codeigniter中从数据库和图像文件夹中删除图像_Php_Codeigniter - Fatal编程技术网

Php 如何在codeigniter中从数据库和图像文件夹中删除图像

Php 如何在codeigniter中从数据库和图像文件夹中删除图像,php,codeigniter,Php,Codeigniter,我想从数据库中删除图像,并从它保存的文件夹中删除 我的删除链接是 <a href="<?php echo base_url().'user/delete_news/'.$row['id']."/".$row['image'];?>" class="confirm"><button class="btn btn-danger btn-sm">Delete</button></a> 请给我这个问题的正确解决方案…我想这会有用的 unli

我想从数据库中删除图像,并从它保存的文件夹中删除

我的删除链接是

<a href="<?php echo base_url().'user/delete_news/'.$row['id']."/".$row['image'];?>" class="confirm"><button class="btn btn-danger btn-sm">Delete</button></a>
请给我这个问题的正确解决方案…

我想这会有用的

 unlink(FCPATH.'assets/img/news_image/'.$path);
 unlink(FCPATH.'assets/img/news_image/'.$path);