This article describes how to enable and disable the magic quotes directive in an .htaccess file.
When the magic quotes directive is enabled, PHP automatically escapes data from HTTP GET and POST requests and cookie data. For example, if a user types “hello” (with the quotation marks) in an HTML form, PHP automatically escapes the quotation marks and stores the value as \“hello\”.
To enable or disable the magic quotes feature, follow these steps:
php_flag magic_quotes_gpc On
To disable the magic quotes feature, add the following line:
php_flag magic_quotes_gpc Off
<?php phpinfo(); ?>
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.