plznty Posted January 30, 2011 Share Posted January 30, 2011 How can I make it so that if file_get_contents cannot find the file else <?php $file = file_get_contents("http://www.example.com/lol.txt"); if ( $file == true ) { } else { } Quote Link to comment https://forums.phpfreaks.com/topic/226099-file_get_contents-required/ Share on other sites More sharing options...
Psycho Posted January 30, 2011 Share Posted January 30, 2011 From the manual: Return Values The function returns the read data or FALSE on failure. http://php.net/manual/en/function.file-get-contents.php Quote Link to comment https://forums.phpfreaks.com/topic/226099-file_get_contents-required/#findComment-1167184 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.