+ <para>
+ In the interests of writing portable code (code that works
+ in any enviroment), or, if you do not have access to change
+ php.ini, you may wish to disable the effects of magic quotes
+ on a per-script basis. This can be done in two ways, with a
+ directive in a .htaccess file (php_value magic_quotes_gpc 0),
+ or by adding the below code to the top of your scripts.
+ <example>
+ <title>Disabling magic quotes at runtime</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+if (get_magic_quotes_gpc()) {
+ $_POST = array_map('stripslashes', $_POST);
+ $_GET = array_map('stripslashes', $_GET);
+ $_COOKIE = array_map('stripslashes', $_COOKIE);
+}
+]]>
Array_map() will not work with multidimensional arrays, will it?
Goba
