Re: System errno in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx> wrote:
>
> Michal Maras wrote:
> > I am now using filesystem functions fopen, fread, fclose, ...
> >
> > On 19/02/2008, Stut <stuttle@xxxxxxxxx> 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@xxxxxxxxxxxxxx)
> http://nick.stinemates.org
>
> AIM: Nick Stinemates
> MSN: nickstinemates@xxxxxxxxxxx
> Yahoo: nickstinemates@xxxxxxxxx
> ==================
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux