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]
|