You are here: Re: Does a fopen with 'b' mode suppress magic_quotes_runtime ? « PHP Programming Language « IT news, forums, messages
Re: Does a fopen with 'b' mode suppress magic_quotes_runtime ?

Posted by Henrik Hansen on 03/30/06 14:30

"flconseil@yahoo.fr" <flconseil@yahoo.fr> writes:

> Hello,
>
> The PHP documentation contains a user note which says that opening a
> file in binary mode ('b' flag) replaces the need to set
> magic_quotes_runtime to off before every read and writes.
>
> As it seems not to correspond to the rest of the documentation (I
> thought that the 'b' mode was used only for Windows end of lines), can
> somebody please tell me if it is right or wrong ?
>
> I am developping a library which needs to read binary data from files
> and, as I have to deal with a possible setting of magic_quotes_runtime
> to on, it would make it much simpler if it could be specified at
> fopen() time.

b is for binary. When you open for example an image you should put b on.

From the manual:
If you do not specify the 'b' flag when working with binary files, you
may experience strange problems with your data, including broken image
files and strange problems with \r\n characters.

As far as I know it has nothing to do with magic_quotes_runtime

--
Henrik Hansen

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация