Hi,

If a file available from an URL, I need to store a value to a variable.

Suppose, I want to check for an image mymg.jpg from
http://www.samplesite.com/images/mymg.jpg.

So, how I can check, whether it available or not?



Try using the file_exists() function:

$filename = '/path/to/foo.txt';

if (file_exists($filename)) {
    echo "The file $filename exists";
} else {
    echo "The file $filename does not exist";
}

Lenny



[Non-text portions of this message have been removed]

Reply via email to