Re: Does a fopen with 'b' mode suppress magic_quotes_runtime ?




flconseil@xxxxxxxx wrote:
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.

Thanks in advance

François

Opening a file with 'b' does not suppress magic_quotes_runtime. If it
is turned on, then file(), fread(), file_get_contents(), and others
will add slashes to their results.

Do people really use magic_quotes_runtime?

.



Relevant Pages

  • Re: Does a fopen with b mode suppress magic_quotes_runtime ?
    ... The PHP documentation contains a user note which says that opening a ... file in binary mode replaces the need to set ... If you do not specify the 'b' flag when working with binary files, ... may experience strange problems with your data, ...
    (comp.lang.php)
  • Does a fopen with b mode suppress magic_quotes_runtime ?
    ... The PHP documentation contains a user note which says that opening a ... file in binary mode ('b' flag) replaces the need to set ...
    (comp.lang.php)
  • Re: String manipulation program not returning expected output
    ... There's non-obvious coding error here interacting with the rest ... Opening the file in text mode makes perfect sense for what he's ... specified substring (the file name and the substring bounds are ... On systems that distinguish between text mode and binary mode ...
    (comp.lang.c)
  • fwrite() not working when appending RDP file...
    ... in hex but readable in notepad) it adds funny little squares to the ... I have tried opening the file in every mode but nothing helps. ... I have tried opening it in binary mode and regular ...
    (comp.lang.php)
  • Re: IOStreams
    ... IOW ... > I'm not opening it in binary mode but I started looking at the code... ...
    (comp.lang.cpp)