in reply to Check if image file exists
Assuming that $image contains the absolute path to the file:
$pointer2 = $sth2->fetchrow_hashref; $image = $pointer2->{'image'}; if ($image && -f $image ) { ## it exists } else { ## It doesn't (or the DB query return false) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Check if image file exists
by htmanning (Friar) on Apr 08, 2012 at 01:23 UTC | |
by aaron_baugher (Curate) on Apr 08, 2012 at 03:50 UTC | |
|
Re^2: Check if image file exists
by htmanning (Friar) on Apr 07, 2012 at 23:59 UTC |