submitted by:

.htaccess: Disable PHP Magic Quotes

As you may know magic-quotes will be totally gone for PHP 6. If you haven't already started coding your PHP sites without magic quotes, now is the time to start. This snippet shows you how to disable magic quotes using .htaccess


code snippet:
# Turn off php magic quotes
php_flag magic_quotes_gpc off

notes:
Please note: you should really turn off magic quotes from php.ini, especially as some old scripts attempt to detect whether or not your magic quotes has been set. The .htaccess method is a decent good way to test and deploy your updated scripts, or do approach your upgrades on a directory by directory basis.