June 2005
Intermediate
720 pages
20h 6m
English
In the last chapter, the escape_data() function was defined as a way to sanctify user input before storing it in a database. At that time I briefly discussed the ini_get() function, which returns the php.ini setting for a submitted configuration option. In that example, I checked if Magic Quotes (magic_quotes_gpc, specifically) was on, as I don’t want to over-escape submitted data. Using the ini_get() function is just one way you can improve the portability of your PHP applications by making scripts behave differently according to server-specific information.
Complementing the ini_get() function is ini_set(), which changes a PHP configuration for the duration of that script. This tool was mentioned in ...
Read now
Unlock full access