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

From: Date: Sun, 08 Mar 2009 10:35:56 +0000
Subject: cvs: phpdoc-ja /reference/strings/functions addslashes.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-2430@lists.php.net to get a copy of this message
takagi Sun Mar 8 10:35:56 2009 UTC Modified files: /phpdoc-ja/reference/strings/functions addslashes.xml Log: sync with en. http://cvs.php.net/viewvc.cgi/phpdoc-ja/reference/strings/functions/addslashes.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc-ja/reference/strings/functions/addslashes.xml diff -u phpdoc-ja/reference/strings/functions/addslashes.xml:1.8 phpdoc-ja/reference/strings/functions/addslashes.xml:1.9 --- phpdoc-ja/reference/strings/functions/addslashes.xml:1.8 Sat Aug 11 04:15:47 2007 +++ phpdoc-ja/reference/strings/functions/addslashes.xml Sun Mar 8 10:35:56 2009 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.8 $ --> -<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.9 $ --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> <!-- CREDITS: shimooka --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.addslashes"> <refnamediv> @@ -25,13 +25,17 @@ <function>addslashes</function> の使用例は、 データベースにデータを登録するときです。例えば、 <literal>O'reilly</literal> という名前をデータベースに挿入するには、 - エスケープする必要があります。ほとんどのデータベースでは - <literal>O\'reilly</literal> という具合に <literal>\</literal> - を使用します。これはデータベースにデータを格納する場合のみ必要です。 + エスケープする必要があります。各 DBMS 専用のエスケープ関数 + (たとえば MySQL なら <function>mysqli_real_escape_string</function>、 + PostgreSQL なら <function>pg_escape_string</function>) + を使うことを強く推奨しますが、もし専用の関数がなく + かつその DBMS が <literal>\</literal> をエスケープ用文字として使用しているのなら + この関数を使用することができます。 + これはデータベースにデータを格納する場合のみ必要です。 追加される <literal>\</literal> は挿入されません。 PHP のディレクティブ <link linkend="ini.magic-quotes-sybase">magic_quotes_sybase</link> - を <literal>\</literal> にすると、<literal>'</literal> + を <literal>on</literal> にすると、<literal>'</literal> はもうひとつの <literal>'</literal> でエスケープされます。 </para> <para>

« previous php.doc.ja (#2430) next »