Reply to Re: Advice on deleting images from server using PHP

Your name:

Reply:


Posted by Krustov on 07/12/06 18:43

<comp.lang.php>
<Frankie>
<Wed, 12 Jul 2006 18:36:01 GMT>
<libtg.6765$ye3.5139@newsread1.news.pas.earthlink.net>

> 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;
$filename="images/whatever.jpg";
if (!file_exists($filename)) {$pass=1;}

if ($pass==1) {unlink($filename);}


unlink() is a silly name for a delete command isnt it .


--
Encrypted email address
www.emailuser.co.uk/?name=KRUSTOV

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация