RE: readfile() problem

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

 



On Fri, October 13, 2006 1:28 am, Peter Lauri wrote:
> Hi, I am trying to do this, but now I cannot set values with ini_set.
> I do
> the following and it outputs "could not set". I have also tried 0,
> "0", but
> that doesn't help.
>
> if(ini_set("output_buffering", "off")) echo "could set";
> else echo "could NOT set";

Even if you *COULD* set it, this PHP code is borked...

If the PREVIOUS value was 0, and ini_set returns the previous value on
success, you get 0 for the return, and then you'll see "could NOT set"
-- because 0 is type-juggled to false.

You'd want:

if (false !== ini_set("output_buffering", "off")) echo "could set";
else echo "could NOT set";

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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