abhi_madhani Posted March 20, 2011 Share Posted March 20, 2011 Hi, I am trying to verify if the given url exists or not, by using file_exists() function. It always returns 'FALSE' , according to my understanding it happening because the file to be checked on the given url is located in safe mode. Could anyone please suggest as to how this could be overcome, by similar function or by using alternative method. Regards Abhishek Madhani Link to comment https://forums.phpfreaks.com/topic/231181-file_exists-returns-false/ Share on other sites More sharing options...
sasa Posted March 20, 2011 Share Posted March 20, 2011 try <?php $e = get_headers('http://www.phpfreaks.com/media/images/forums/logo.png'); if(preg_match('/OK/', $e[0])) echo 'TRUE'; else echo 'FALSE'; //print_r($e); ?> Link to comment https://forums.phpfreaks.com/topic/231181-file_exists-returns-false/#findComment-1189980 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.