downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

What are Magic Quotes> <User Submitted Data
Last updated: Fri, 06 Nov 2009

view this page in

Magic Quotes

Table of Contents

Warning

This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

Magic Quotes is a process that automagically escapes incoming data to the PHP script. It's preferred to code with magic quotes off and to instead escape the data at runtime, as needed.



add a note add a note User Contributed Notes
Magic Quotes
07-Dec-2005 03:09
You should try to avoid magic_quotes in all its flavors, use add_slashes() and strip_slashes() instead with user input and you will save time and avoid common problems that come along.

You should know also that if your server has php suexec enabled you won't be able use php_flag in .htaccess file to change php values like magic_quotes or register_globals. In this case you might wanna try creating a php.ini file on the same directory as your script and add something like this:

magic_quotes_runtime=off
magic_quotes_gpc=off
magic_quotes_sybase=off
register_globals=on ; only as an example

----
Mel
http://www.webhostingjournal.net/
richard dot spindler at gmail dot com
18-Aug-2005 10:59
to turn of magic quotes put the following line into the .htaccess file:

php_flag magic_quotes_gpc off

What are Magic Quotes> <User Submitted Data
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites