Re: new function last_????_error()
| From: | Rasmus Lerdorf | Date: | Fri, 26 Jul 2002 06:20:28 +0000 |
| Subject: | Re: new function last_????_error() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86221@lists.php.net to get a copy of this message | ||
Can't you just pick this out of $php_errormsg? (assuming track_errors is
on, of course)
-Rasmus
On Fri, 26 Jul 2002, Stefan Esser wrote:
> 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
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>