Answers for "check image file exists in php"

PHP
1

php if no imagee exists

<?php
$image_path_filename = '/path/images/donate.jpg';

if (file_exists($image_path_filename)) {
    echo "The file $image_path_filename exists";
} else {
    echo "The file $image_path_filename does not exist";
}
?>
Posted by: Guest on August-30-2020
5

php check if file exists

if (!file_exists('http://mysite.com/images/thumbnail_1286954822.jpg')) {   
$filefound = '0';                         
}
Posted by: Guest on March-24-2020

Browse Popular Code Answers by Language