new function last_????_error()
| From: | Stefan Esser | Date: | Fri, 26 Jul 2002 06:21:51 +0000 |
| Subject: | new function last_????_error() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-86219@lists.php.net to get a copy of this message | ||
Hi all,
i think PHP lacks one important function. It should be possible
for a PHP script to determine if a function failed due to SAFE
MODE restrictions or Open Base Dir. Right now on error all functions
simply return FALSE. I would like to add some function with the
following behaviour:
checkuid: -> FALSE last_????_error() = FAILED_DUE_SAFE_MODE
TRUE last_????_error() = OK
openbasedir: -> FALSE last_????_error() = FAILED_DUE_BASEDIR
TRUE last_????_error() = OK
This function will be very usefull because a script could then
tell the user that is has no access and because of what...
Right now only the ugly error messages tell that.
My only problem now is: HOW to call the function and HOW to call the
3 Constants???
Stefan Esser