check if file exists in php

anonymous picture anonymous · Nov 23, 2010 · Viewed 144.1k times · Source
if (!(file_exists(http://mysite.com/images/thumbnail_1286954822.jpg))) {   
$filefound = '0';                         
}

why won't this work?

Answer

Haim Evgi picture Haim Evgi · Nov 23, 2010
if (!file_exists('http://example.com/images/thumbnail_1286954822.jpg')) {   
$filefound = '0';
}