FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » newbie question: Is config.php necessary?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: newbie question: Is config.php necessary? [message #170623 is a reply to message #170611] Thu, 11 November 2010 18:40 Go to previous messageGo to previous message
Thomas Mlynarczyk is currently offline  Thomas Mlynarczyk
Messages: 131
Registered: September 2010
Karma:
Senior Member
Erwin Moller schrieb:
[magic_quotes_gpc cannot be set at runtime]
> Correct. That was confusing.
> But it is there for a reason. ;-)
> The reason it is there anyway is: the following block (that checks the
> values) produces an error in case magic_quotes_gpc is on.

Okay, but actually, why bother since you can access the raw data using
filter_input() even with magic_quotes_gpc on:

// http://localhost/test.php?value=It's+a+"test"
var_dump( filter_input( INPUT_GET, 'value', FILTER_UNSAFE_RAW ) );
var_dump( @$_GET['value'] );

Output:
string 'It's a "test"' (length=13)
string 'It\'s a \"test\"' (length=16)

> (I had a few more ini-values in there, but cut a lot out. The code was
> only posted to show the idea of the kind of things you can do in a
> 'global config' file.)

Indeed, that gave me some inspiration for my own global setup stuff. :-)

[Use E_ALL | E_STRICT, not just E_ALL]
> Yes, I am aware of E_ALL and E_STRICT: this examplecode comes from a
> project where I didn't want strict errors to error out.

Yes, sometimes one has to work with projects like this (SimpleTest, for
example is not "strict proof"). :-(

Greetings,
Thomas

--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variable expansion <?=$foo?> not working anymore
Next Topic: need urgent help
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 01:14:39 GMT 2024

Total time taken to generate the page: 0.04753 seconds