On Mon, 8 Jul 2002, Martin Towell wrote:

>>> <?
>>> if(ini_set("register_globals", "0"))
>>>   echo "ini_set success";
>>> else
>>>   echo "ini_set failed";
>>> ?>
>I haven't tried this code

Then why comment on it?

>but I assume you're trying to say that "ini_set
>failed" is displayed, but you're expecting the other output to be displayed.
>Am I correct there?

Yes, is it not obvious enough from just reading the code?  I am showing 
that the ini_set() function is not working properly, as per the manual. 
The manual states that ini_set() returns the old value on success and 
FALSE on failure.  My script always returns false.  Any idea why?

>What happens if you use http://localhost/file.php?var=something or whatever
>your test script's path is and have this line at the end of the script
>  echo "var = |$var|";

What does this prove or disprove in relation to the ini_set() function?  
If you knew anything about the function then you would see I am passing it 
a big fat zero in the second parameter, just as the manual states I can. I 
also tried "Off" and "off", same results.

>does $var contain anything. If it doesn't, then ini_set() worked...
>otherwise.. um... find other way of doing it(??)

Yes..  another way, any suggestions?

Greg Donald

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to