ronz Posted May 6, 2008 Share Posted May 6, 2008 When the file() command fails, is there a way to see an error code? I don't see that in the documentation. Link to comment https://forums.phpfreaks.com/topic/104475-file-command-error-codes/ Share on other sites More sharing options...
Fadion Posted May 7, 2008 Share Posted May 7, 2008 It wont return error codes, it will just return false on failure as stated on the manual: Upon failure, file() returns FALSE. Link to comment https://forums.phpfreaks.com/topic/104475-file-command-error-codes/#findComment-534842 Share on other sites More sharing options...
Fadion Posted May 7, 2008 Share Posted May 7, 2008 Ohh and it will throw a warning also in failure: Warning: file(file.txt) [function.file]: failed to open stream: No such file or directory in.... which normally can be surpressed by @file('file.txt'); Link to comment https://forums.phpfreaks.com/topic/104475-file-command-error-codes/#findComment-534846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.