cvs: phpdoc-zh /reference/strings/functions addslashes.xml

From: Date: Wed, 21 Apr 2004 12:23:54 +0000
Subject: cvs: phpdoc-zh /reference/strings/functions addslashes.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-1859@lists.php.net to get a copy of this message
nio Wed Apr 21 08:23:54 2004 EDT Added files: /phpdoc-zh/reference/strings/functions addslashes.xml Log: Add the file. http://cvs.php.net/co.php/phpdoc-zh/reference/strings/functions/addslashes.xml?r=1.1&p=1 Index: phpdoc-zh/reference/strings/functions/addslashes.xml +++ phpdoc-zh/reference/strings/functions/addslashes.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: nio $ --> <!-- EN-Revision: 1.3 Maintainer: nio Status: ready --> <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --> <refentry id="function.addslashes"> <refnamediv> <refname>addslashes</refname> <refpurpose>ʹÓ÷´Ð±ÏßÒýÓÃ×Ö·û´®</refpurpose> </refnamediv> <refsect1> <title>ÃèÊö</title> <methodsynopsis> <type>string</type><methodname>addslashes</methodname> <methodparam><type>string</type><parameter>str</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø×Ö·û´®£¬¸Ã×Ö·û´®ÎªÁËÊý¾Ý¿â²éѯÓï¾äµÈµÄÐèÒªÔÚijЩ×Ö·ûǰ¼ÓÉÏÁË·´Ð±Ïß¡£ÕâЩ×Ö·ûÊǵ¥ÒýºÅ£¨<literal>'</literal>£©¡¢Ë«ÒýºÅ£¨<literal>"</literal>£©¡¢·´Ð±Ïߣ¨<literal>\</literal>£©Óë NUL£¨&null; ×Ö·û£©¡£ </para> <para> Ò»¸öʹÓà <function>addslashes</function> µÄÀý×ÓÊǵ±ÄãÒªÍùÊý¾Ý¿âÖÐÊäÈëÊý¾Ýʱ¡£ÀýÈ磬½«Ãû×Ö <literal>O'reilly</literal> ²åÈëµ½Êý¾Ý¿âÖУ¬Õâ¾ÍÐèÒª¶ÔÆä½øÐÐתÒå¡£´ó¶àÊý¾Ý¿âʹÓà <literal>\</literal> ×÷ΪתÒå·û£º<literal>O\'reilly</literal>¡£ÕâÑù¿ÉÒÔ½«Êý¾Ý·ÅÈëÊý¾Ý¿âÖУ¬¶ø²»»á²åÈë¶îÍâµÄ <literal>\</literal>¡£µ± PHP Ö¸Áî <link linkend="ini.magic-quotes-sybase">magic_quotes_sybase</link> ±»ÉèÖÃ³É <literal>on</literal> ʱ£¬Òâζ×ŲåÈë <literal>'</literal> ʱ½«Ê¹Óà <literal>'</literal> ½øÐÐתÒå¡£ </para> <para> ĬÈÏÇé¿öÏ£¬PHP Ö¸Áî <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> Ϊ <literal>on</literal>£¬ËüÖ÷ÒªÊǶÔËùÓÐµÄ GET¡¢POST ºÍ COOKIE Êý¾Ý×Ô¶¯ÔËÐÐ <function>addslashes</function>¡£²»Òª¶ÔÒѾ­±» <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> תÒå¹ýµÄ×Ö·û´®Ê¹Óà <function>addslashes</function>£¬ÒòΪÕâÑù»áµ¼ÖÂË«²ãתÒå¡£Óöµ½ÕâÖÖÇé¿öʱ¿ÉÒÔʹÓú¯Êý <function>get_magic_quotes_gpc</function> ½øÐмì²â¡£ </para> <para> <example> <title><function>addslashes</function> ʾÀý</title> <programlisting role="php"> <![CDATA[ <?php $str = "Is your name O'reilly?"; // Êä³ö£ºIs your name O\'reilly? echo addslashes($str); ?> ]]> </programlisting> </example> </para> <para> ²Î¼û <function>stripslashes</function>¡¢<function>htmlspecialchars</function>¡¢<function>quotemeta</function> ºÍ <function>get_magic_quotes_gpc</function>¡£ </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.doc.zh (#1859) next »