cvs: phpdoc-fr /language/oop5 autoload.xml /reference/curl/functions curl-setopt.xml
| From: | Guillaume Plessis | Date: | Thu, 03 Apr 2008 14:27:20 +0000 |
| Subject: | cvs: phpdoc-fr /language/oop5 autoload.xml /reference/curl/functions curl-setopt.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-5685@lists.php.net to get a copy of this message | ||
gui Thu Apr 3 14:27:20 2008 UTC
Modified files:
/phpdoc-fr/language/oop5 autoload.xml
/phpdoc-fr/reference/curl/functions curl-setopt.xml
Log:
sync with EN
http://cvs.php.net/viewvc.cgi/phpdoc-fr/language/oop5/autoload.xml?r1=1.13&r2=1.14&diff_format=u
Index: phpdoc-fr/language/oop5/autoload.xml
diff -u phpdoc-fr/language/oop5/autoload.xml:1.13 phpdoc-fr/language/oop5/autoload.xml:1.14
--- phpdoc-fr/language/oop5/autoload.xml:1.13 Sat Jan 26 22:31:13 2008
+++ phpdoc-fr/language/oop5/autoload.xml Thu Apr 3 14:27:19 2008
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.13 $ -->
-<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
+<!-- $Revision: 1.14 $ -->
+<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->
-
<sect1 xml:id="language.oop5.autoload" xmlns="http://docbook.org/ns/docbook">
<title>Auto-chargement de classes</title>
<para>
@@ -63,10 +62,34 @@
]]>
</programlisting>
</example>
+ <example>
+ <para>
+ Cet exemple tente de charger l'interface <literal>ITest</literal>.
+ </para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+function __autoload($name) {
+ var_dump($name);
+}
+
+class Foo implements ITest {
+}
+
+/*
+string(5) "ITest"
+
+Fatal error: Interface 'ITest' not found in ...
+*/
+?>
+]]>
+ </programlisting>
+ </example>
</para>
</sect1>
-
+
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/curl/functions/curl-setopt.xml?r1=1.42&r2=1.43&diff_format=u
Index: phpdoc-fr/reference/curl/functions/curl-setopt.xml
diff -u phpdoc-fr/reference/curl/functions/curl-setopt.xml:1.42
phpdoc-fr/reference/curl/functions/curl-setopt.xml:1.43
--- phpdoc-fr/reference/curl/functions/curl-setopt.xml:1.42 Sat Mar 8 09:15:53 2008
+++ phpdoc-fr/reference/curl/functions/curl-setopt.xml Thu Apr 3 14:27:20 2008
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.42 $ -->
-<!-- EN-Revision: 1.28 Maintainer: yannick Status: ready -->
+<!-- $Revision: 1.43 $ -->
+<!-- EN-Revision: 1.30 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
-
<refentry xml:id="function.curl-setopt" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>curl_setopt</refname>
<refpurpose>Définit une option de transmission cURL</refpurpose>
</refnamediv>
-
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@@ -260,7 +259,7 @@
</row>
<row>
<entry><constant>CURLOPT_NOPROGRESS</constant></entry>
- <entry>
+ <entry><para>
&true; pour désactiver la barre de progression des transferts cURL.
<note>
<para>
@@ -268,7 +267,7 @@
que le temps du débogage.
</para>
</note>
- </entry>
+ </para></entry>
<entry>
</entry>
</row>
@@ -708,7 +707,7 @@
</row>
<row>
<entry><constant>CURLOPT_CUSTOMREQUEST</constant></entry>
- <entry>
+ <entry><para>
Une méthode de requête qui sera utilisée à la place de
<literal>"GET"</literal>
ou <literal>"HEAD"</literal> lors des requêtes HTTP. Cette
commande est pratique pour
effectuer un <literal>"DELETE"</literal> ou une autre commande
HTTP exotique.
@@ -721,7 +720,7 @@
N'utilisez pas cette commande sans vous assurer que le serveur l'accepte.
</para>
</note>
- </entry>
+ </para></entry>
<entry>
</entry>
</row>
@@ -793,7 +792,8 @@
<entry><constant>CURLOPT_POSTFIELDS</constant></entry>
<entry>
Toutes les données à passer lors d'une opération de HTTP POST.
- Pour envoyer un fichier, préfixez le nom du fichier avec un
<literal>@</literal>.
+ Pour envoyer un fichier, préfixez le nom du fichier avec un
<literal>@</literal> et
+ utilisez le chemin complet.
</entry>
<entry>
</entry>
@@ -1151,9 +1151,7 @@
&reftitle.examples;
<para>
<example>
- <title>
- Initialisation d'une nouvelle session CURL et recherche d'une page Web
- </title>
+ <title>Initialisation d'une nouvelle session CURL et recherche d'une page
Web</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -1174,6 +1172,54 @@
</programlisting>
</example>
</para>
+ <para>
+ <example>
+ <title>Uploader un fichier</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+/* http://localhost/upload.php:
+print_r($_POST);
+print_r($_FILES);
+*/
+
+$ch = curl_init();
+
+$data = array('name' => 'Foo', 'file' =>
'@/home/user/test.png');
+
+curl_setopt($ch, CURLOPT_URL, 'http://localhost/upload.php');
+curl_setopt($ch, CURLOPT_POST, 1);
+curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
+
+curl_exec($ch);
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+Array
+(
+ [name] => Foo
+)
+Array
+(
+ [file] => Array
+ (
+ [name] => test.png
+ [type] => image/png
+ [tmp_name] => /tmp/phpcpjNeQ
+ [error] => 0
+ [size] => 279
+ )
+
+)
+
+]]>
+ </screen>
+ </example>
+ </para>
</refsect1>
<refsect1 role="seealso">
@@ -1206,4 +1252,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
\ No newline at end of file
+-->