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

Your name:

Reply:


Posted by Frankie on 07/14/06 02:53

"Krustov" <me@privacy.net> wrote in message
news:MPG.1f1f530eb49767d989bd1@news.newsreader.com...
>
> $pass=0;
> $filename="images/whatever.jpg";
> if (!file_exists($filename)) {$pass=1;}
>
> if ($pass==1) {unlink($filename);}

Thanks for your example! I like your code's simplicity. The documentation at
php.net is difficult for me to follow.

However, I need to use variables in this code.

Specifically, I'm trying to do something like this:

$pass=0;
$filename="../{$_POST['hfCategory']}/photos/{$_POST['hfItemNumber']}.jpg";
if (!file_exists($filename)) {$pass=1;}

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

...but it's not working.

Any additional advice appreciated.

F.H.

[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

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