Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

cvs: phpdoc /en/reference/info/functions get-magic-quotes-gpc.xml
aidan		Wed Nov 24 21:47:55 2004 EDT

Modified files:
/phpdoc/en/reference/info/functions	get-magic-quotes-gpc.xml
Log:
Removed duplicated info, and pointed users to the security section

http://cvs.php.net/diff.php/phpdoc/...13&r2=1.14&ty=u
Index: phpdoc/en/reference/info/functions/get-magic-quotes-gpc.xml
diff -u phpdoc/en/reference/info/functions/get-magic-quotes-gpc.xml:1.13 php
doc/en/reference/info/functions/get-magic-quotes-gpc.xml:1.14
--- phpdoc/en/reference/info/functions/get-magic-quotes-gpc.xml:1.13	Mon Sep
 20 07:42:17 2004
+++ phpdoc/en/reference/info/functions/get-magic-quotes-gpc.xml	Wed Nov 24 2
1:47:54 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.13 $ -->
+<!-- $Revision: 1.14 $ -->
<!-- splitted from ./en/functions/info.xml, last change in rev 1.2 -->
<refentry id="function.get-magic-quotes-gpc">
<refnamediv>
@@ -58,38 +58,8 @@
</example>
</para>
<para>
-     In the interests of writing portable code (code that works
-     in any environment), 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()) {
-    function stripslashes_deep($value)
-    {
-        $value = is_array($value) ?
-                    array_map('stripslashes_deep', $value) :
-                    stripslashes($value);
-
-        return $value;
-    }
-
-    $_POST = array_map('stripslashes_deep', $_POST);
-    $_GET = array_map('stripslashes_deep', $_GET);
-    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
-}
-?>
-]]>
-      </programlisting>
-     </example>
-     Magic-quotes was added to reduce code written by beginners from being 
dangerous.
-     If you disable magic quotes, you must be very careful to protect yours
elf from
-     SQL injection attacks.
+     For more information about magic_quotes, see this
+     <link linkend="security.magicquotes">security section</link>.
</para>
<simpara>
See also <function>addslashes</function>,

Report this thread to moderator Post Follow-up to this message
Old Post
Aidan Lister
11-25-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:56 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.