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) }
In reply to Re: Check if image file exists
by BrowserUk
in thread Check if image file exists
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |