RE: [PHP] readfile() problem
| From: | Richard Lynch | Date: | Fri, 13 Oct 2006 19:20:01 +0000 |
| Subject: | RE: [PHP] readfile() problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243102@lists.php.net to get a copy of this message | ||
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?