Monday, April 9, 2012

Disable magic quotes in htaccess

How to disable magic quotes using .htaccess?

To turn off magic quotes, just add the following line of code to your .htaccess file:

php_value magic_quotes_gpc off

To check the current status of magic quotes in your script, use the function get_magic_quotes_gpc(). It will return 0 when magic_quotes_gpc is off, and 1 when this setting is on.

No comments:

Post a Comment