September 2001
Intermediate to advanced
768 pages
32h 45m
English
int get_magic_quotes_gpc(void)
Gets the current magic_quotes_gpc setting.
Returns:
1 if on; 0 if off
Description:
Shows whether the configuration option magic_quotes_gpc is on or off. This can also be determined from phpinfo(). For example, this function is useful for determining whether addslashes() needs to be used on data before writing it to a database. magic_quotes_gpc controls whether data received from GET, POST, or COOKIE operations has special characters prepended with a backslash (\).
Version:
Existing since version 3.0.6
Example:
if (get_magic_quotes_gpc()) echo "get_magic_quotes_gpc is on"; |
Read now
Unlock full access