php get_contents script?

Dan

New member
I'm using the following to check if a file exists:

$file = @file_get_contents("$url", 'r');

if ($file)
{}

However when the file doesn't exist the scrippt just stops working instead of going to the else that is not shown here.

What is wrong with this?
 
Back
Top