使用PHP从服务器删除图像的建议 [英] Advice on deleting images from server using PHP

查看:67
本文介绍了使用PHP从服务器删除图像的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:


我正在编写一个网站,允许所有者对他的产品数据库进行添加/更改/删除

,其中包括产品图像分别存储在

服务器上。我编写了删除页面,该页面从数据库中删除了产品记录,但是产品图像仍保留在服务器上的相关文件夹中。我希望这些图片不会累积,并希望删除这些图像以及数据库记录。


任何人都可以将我推荐给PHP脚本或建议一种方法来做到这一点?


Frank H.

德克萨斯州奥斯汀

Hello:

I''m coding a website which allows the owner to make add/change/deletes to
his product database, which includes product images stored separately on the
server. I have coded the Delete page which deletes the product record from
the database, however the product image remains in the associated folder on
the server. I''d prefer these images not accumulate and would like to delete
these images along with the database record.

Can anyone refer me to a PHP script or suggest a way to do this?

Frank H.
Austin, TX

推荐答案

< comp.lang.php>

< Frankie>

< Wed,2006年7月12日18:36:01 GMT>

< li ***************** @ newsread1.news.pas.earthlink。 net>
<comp.lang.php>
<Frankie>
<Wed, 12 Jul 2006 18:36:01 GMT>
<li*****************@newsread1.news.pas.earthlink. net>

我正在编写一个网站,允许所有者在他的产品数据库中添加/更改/删除
包括单独存储在

服务器上的产品图像。我编写了删除页面,该页面从数据库中删除了产品记录,但是产品图像仍保留在服务器上的相关文件夹中。我希望这些图片不会累积,并希望删除这些图像以及数据库记录。


任何人都可以将我推荐给PHP脚本或建议一种方法吗?
I''m coding a website which allows the owner to make add/change/deletes to
his product database, which includes product images stored separately on the
server. I have coded the Delete page which deletes the product record from
the database, however the product image remains in the associated folder on
the server. I''d prefer these images not accumulate and would like to delete
these images along with the database record.

Can anyone refer me to a PHP script or suggest a way to do this?


pass = 0;
pass=0;


filename =" images / whatever.jpg" ;;

if(!file_exists(
filename="images/whatever.jpg";
if (!file_exists(


这篇关于使用PHP从服务器删除图像的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆