Re: System errno in PHP
| From: | Michal Maras | Date: | Wed, 20 Feb 2008 08:56:00 +0000 |
| Subject: | Re: System errno in PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269703@lists.php.net to get a copy of this message | ||
Hello Nick
I have read http://php.net/fopen from top to bottom, but I could
not find
how to get system error number.
With set_error_handler I can get string for example
fopen(hmc_configuration.cfg)
[function.fopen<http://ds63450.mspr.detemobil.de/%7Emmaras/HMC/function.fopen>]:
failed to open stream: Permission denied
but I need integer number not string, because string error messages depends
on locale setting.
Of course, I can test some conditions before fopen, but it is not enough
for me.
By
On 19/02/2008, Nick Stinemates <nick@stinemates.org> wrote:
>
> Michal Maras wrote:
> > I am now using filesystem functions fopen, fread, fclose, ...
> >
> > On 19/02/2008, Stut <stuttle@gmail.com> wrote:
> >
> >> Michal Maras wrote:
> >>
> >>> Coud somebody tell me if it is possible to get integer value of
> >>>
> >> variable
> >>
> >>> which name in C is errno end in perl $!.
> >>> I am PHP beginner so I am sorry if question is 'stupid'.
> >>>
> >> What function are you calling where you expect to get a system error?
> >> Check the manual page for that function - it will tell you how to
> detect
> >> errors.
> >>
> >> -Stut
> >>
> >> --
> >> http://stut.net/
> >>
> >>
> >
> >
> http://php.net/fopen
>
> --
> ==================
> Nick Stinemates (nick@stinemates.org)
> http://nick.stinemates.org
>
> AIM: Nick Stinemates
> MSN: nickstinemates@hotmail.com
> Yahoo: nickstinemates@yahoo.com
> ==================
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>