Assume the example:
$myFile = fopen("foo.txt","r");
If this returns false, how can I check what the reason for the error is? Is there an error type object or method like in VB?
I am actually programming in Linux RH9 and version 4.?? of PHP.
Thanks
Getting the actual error code for file operations
Moderator: General Moderators
may be this will be of help:
PHP manual wrote: The previous error message: $php_errormsg
$php_errormsg is a variable containing the text of the last error message generated by PHP. This variable will only be available within the scope in which the error occurred, and only if the track_errors configuration option is turned on (it defaults to off).