cvs: phpdoc-fr /reference/array/functions list.xml /reference/bzip2/functions bzcompress.xml bzdecompress.xml bzopen.xml bzread.xml
/reference/datetime/functions strftime.xml /reference/dbx/functions dbx-close.xml /reference/fbsql/functions fbsql-create-db.xml
/reference/imap/functions imap-createmailbox.xml imap-status.xml /reference/pgsql/functions pg-close.xml pg-get-notify.xml /reference/xslt/functions
xslt-error.xml xslt-set-log.xml

From: Date: Sun, 14 Dec 2003 23:27:51 +0000
Subject: cvs: phpdoc-fr /reference/array/functions list.xml /reference/bzip2/functions bzcompress.xml bzdecompress.xml bzopen.xml bzread.xml
/reference/datetime/functions strftime.xml /reference/dbx/functions dbx-close.xml /reference/fbsql/functions fbsql-create-db.xml
/reference/imap/functions imap-createmailbox.xml imap-status.xml /reference/pgsql/functions pg-close.xml pg-get-notify.xml /reference/xslt/functions
xslt-error.xml xslt-set-log.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-1009@lists.php.net to get a copy of this message
didou Sun Dec 14 18:27:51 2003 EDT Modified files: /phpdoc-fr/reference/array/functions list.xml /phpdoc-fr/reference/bzip2/functions bzcompress.xml bzdecompress.xml bzopen.xml bzread.xml /phpdoc-fr/reference/datetime/functions strftime.xml /phpdoc-fr/reference/dbx/functions dbx-close.xml /phpdoc-fr/reference/fbsql/functions fbsql-create-db.xml /phpdoc-fr/reference/imap/functions imap-createmailbox.xml imap-status.xml /phpdoc-fr/reference/pgsql/functions pg-close.xml pg-get-notify.xml /phpdoc-fr/reference/xslt/functions xslt-error.xml xslt-set-log.xml Log: sync with en s/echo/print

Index: phpdoc-fr/reference/array/functions/list.xml diff -u phpdoc-fr/reference/array/functions/list.xml:1.4 phpdoc-fr/reference/array/functions/list.xml:1.5 --- phpdoc-fr/reference/array/functions/list.xml:1.4 Tue Aug 26 08:56:16 2003 +++ phpdoc-fr/reference/array/functions/list.xml Sun Dec 14 18:27:46 2003 @@ -37,15 +37,15 @@ // Liste de toutes les variables list($drink, $color, $power) = $info; -print "$drink est $color et la $power le rend particulier.\n"; +echo "$drink est $color et la $power le rend particulier.\n"; // Liste de certaines variables list($drink, , $power) = $info; -print "$drink contient de la $power.\n"; +echo "$drink contient de la $power.\n"; // Ou bien, n'utilisons que le troisi&egrave;me list( , , $power) = $info; -print "J'ai besoin de $power!\n"; +echo "J'ai besoin de $power!\n"; ?> ]]> @@ -67,10 +67,10 @@ $resultat = mysql_query ("SELECT id, nom, salaire FROM employes",$conn); while (list ($id, $nom, $salaire) = mysql_fetch_row ($resultat)) { - print (" <tr>\n". + echo " <tr>\n". " <td><a href=\"info.php?id=$id\">$nom</a></td>\n". " <td>$salaire</td>\n". - " </tr>\n"); + " </tr>\n"; } ?> Index: phpdoc-fr/reference/bzip2/functions/bzcompress.xml diff -u phpdoc-fr/reference/bzip2/functions/bzcompress.xml:1.3 phpdoc-fr/reference/bzip2/functions/bzcompress.xml:1.4 --- phpdoc-fr/reference/bzip2/functions/bzcompress.xml:1.3 Wed Sep 24 18:43:30 2003 +++ phpdoc-fr/reference/bzip2/functions/bzcompress.xml Sun Dec 14 18:27:46 2003 @@ -41,6 +41,7 @@ <?php $str = "donn&eacute;es de test"; $bzstr = bzcompress($str, 9); + echo $bzstr; ?> ]]> </programlisting> Index: phpdoc-fr/reference/bzip2/functions/bzdecompress.xml diff -u phpdoc-fr/reference/bzip2/functions/bzdecompress.xml:1.4 phpdoc-fr/reference/bzip2/functions/bzdecompress.xml:1.5 --- phpdoc-fr/reference/bzip2/functions/bzdecompress.xml:1.4 Wed Sep 24 18:43:30 2003 +++ phpdoc-fr/reference/bzip2/functions/bzdecompress.xml Sun Dec 14 18:27:46 2003 @@ -31,7 +31,17 @@ <programlisting role="php"> <![CDATA[ <?php - $str = $bzdecompress($bzstr); + $start_str = "Phrase &grave; compresser"; + $bzstr = bzcompress($start_str); + + echo "Compression : "; + echo $bzstr; + echo "\n<br />\n"; + + $str = bzdecompress($bzstr); + echo "D&eacute;compression : "; + echo $str; + echo "\n<br />\n"; ?> ]]> </programlisting> Index: phpdoc-fr/reference/bzip2/functions/bzopen.xml diff -u phpdoc-fr/reference/bzip2/functions/bzopen.xml:1.2 phpdoc-fr/reference/bzip2/functions/bzopen.xml:1.3 --- phpdoc-fr/reference/bzip2/functions/bzopen.xml:1.2 Mon Jun 2 12:30:24 2003 +++ phpdoc-fr/reference/bzip2/functions/bzopen.xml Sun Dec 14 18:27:46 2003 @@ -22,8 +22,7 @@ </para> <para> Si l'ouverture &eacute;choue, <function>bzopen</function> retourne - &false;, sinon, elle retourne un pointeur - de fichier. + &false;, sinon, elle retourne un pointeur de fichier. </para> <para> <example> @@ -31,7 +30,10 @@ <programlisting role="php"> <![CDATA[ <?php - $bz = bzopen("/tmp/foo.bz2", "r"); + $file = "/tmp/foo.bz2"; + $bz = bzopen($file, "r") or die("Impossible d'ouvrir $file"); + + bzclose($bz); ?> ]]> </programlisting> Index: phpdoc-fr/reference/bzip2/functions/bzread.xml diff -u phpdoc-fr/reference/bzip2/functions/bzread.xml:1.2 phpdoc-fr/reference/bzip2/functions/bzread.xml:1.3 --- phpdoc-fr/reference/bzip2/functions/bzread.xml:1.2 Mon Jun 2 12:30:24 2003 +++ phpdoc-fr/reference/bzip2/functions/bzread.xml Sun Dec 14 18:27:46 2003 @@ -31,9 +31,17 @@ <programlisting role="php"> <![CDATA[ <?php - $bz = bzopen("/tmp/foo.bz2", "r"); - $str = bzread($bz, 2048); - echo $str; + $file = "/tmp/foo.bz2"; + $bz = bzopen($file, "r") or die("Impossible d'ouvrir $file"); + + $decompressed_file = ''; + while (!feof($bz)) { + $decompressed_file .= bzread($bz, 4096); + } + bzclose($bz); + + echo "Le contenu de $file est :<br />\n"; + echo $decompressed_file; ?> ]]> </programlisting> @@ -41,7 +49,8 @@ </para> <para> Voir aussi - <function>bzwrite</function> et + <function>bzwrite</function>, + <function>feof</function> and <function>bzopen</function>. </para> </refsect1> Index: phpdoc-fr/reference/datetime/functions/strftime.xml diff -u phpdoc-fr/reference/datetime/functions/strftime.xml:1.3 phpdoc-fr/reference/datetime/functions/strftime.xml:1.4 --- phpdoc-fr/reference/datetime/functions/strftime.xml:1.3 Tue Dec 10 07:43:15 2002 +++ phpdoc-fr/reference/datetime/functions/strftime.xml Sun Dec 14 18:27:47 2003 @@ -219,28 +219,27 @@ </para> </note> <example> - <title>Exemple <function>strftime</function></title> + <title>Exemple avec <function>strftime</function></title> <programlisting role="php"> <![CDATA[ <?php - setlocale (LC_TIME, "C"); - print(strftime("%A en Finlandais est ")); - setlocale (LC_TIME, "fi"); - print(strftime("%A, en Fran&ccedil;ais ")); - setlocale (LC_TIME, "fr"); - print(strftime("%A et en Allemand ")); - setlocale (LC_TIME, "de"); - print(strftime("%A.\n")); + setlocale(LC_TIME, "C"); + echo strftime("%A en Finlandais est "); + setlocale(LC_TIME, "fi"); + echo strftime("%A, en Fran&ccedil;ais "); + setlocale(LC_TIME, "fr"); + echo strftime("%A et en Allemand "); + setlocale(LC_TIME, "de"); + echo strftime("%A.\n"); ?> ]]> </programlisting> </example> - Cet exemple ne fonctionnera que si vous avez les configurations respectives + Cet exemple ne fonctionnera que si vous avez les locales respectives install&eacute;es sur votre syst&egrave;me. </para> <para> Voir aussi - <function>strftime</function>, <function>setlocale</function>, <function>mktime</function> et le <ulink url="&spec.strftime;">groupe de sp&eacute;cifications de strftime()</ulink>. Index: phpdoc-fr/reference/dbx/functions/dbx-close.xml diff -u phpdoc-fr/reference/dbx/functions/dbx-close.xml:1.2 phpdoc-fr/reference/dbx/functions/dbx-close.xml:1.3 --- phpdoc-fr/reference/dbx/functions/dbx-close.xml:1.2 Tue Nov 11 06:31:59 2003 +++ phpdoc-fr/reference/dbx/functions/dbx-close.xml Sun Dec 14 18:27:48 2003 @@ -21,9 +21,9 @@ <![CDATA[ <?php $link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password") - or die ("Could not connect"); + or die("Impossible de se connecter"); -print("Connected successfully"); +echo "Connect&eacute;"; dbx_close($link); ?> ]]> Index: phpdoc-fr/reference/fbsql/functions/fbsql-create-db.xml diff -u phpdoc-fr/reference/fbsql/functions/fbsql-create-db.xml:1.4 phpdoc-fr/reference/fbsql/functions/fbsql-create-db.xml:1.5 --- phpdoc-fr/reference/fbsql/functions/fbsql-create-db.xml:1.4 Thu May 8 17:35:48 2003 +++ phpdoc-fr/reference/fbsql/functions/fbsql-create-db.xml Sun Dec 14 18:27:49 2003 @@ -24,9 +24,9 @@ <![CDATA[ <?php $link = fbsql_pconnect("localhost", "_SYSTEM", "secret") - or die ("Impossible de se connecter"); + or die("Impossible de se connecter"); if (fbsql_create_db("my_db")) { - print("Base de donn&eacute;es cr&eacute;&eacute;e!\n"); + echo "Base de donn&eacute;es cr&eacute;&eacute;e!\n"; } else { printf("Erreur de cr&eacute;ation de la base de donn&eacute;es : %s\n", fbsql_error()); } Index: phpdoc-fr/reference/imap/functions/imap-createmailbox.xml diff -u phpdoc-fr/reference/imap/functions/imap-createmailbox.xml:1.2 phpdoc-fr/reference/imap/functions/imap-createmailbox.xml:1.3 --- phpdoc-fr/reference/imap/functions/imap-createmailbox.xml:1.2 Wed Feb 5 22:49:01 2003 +++ phpdoc-fr/reference/imap/functions/imap-createmailbox.xml Sun Dec 14 18:27:49 2003 @@ -34,35 +34,36 @@ $name1 = "nouvellephpbox"; $name2 = imap_utf7_encode("nouvellephpbox&eacute;x"); $newname = $name1; -echo "Le nouveau nom sera '$name1'<BR>\n"; +echo "Le nouveau nom sera '$name1'<br />\n"; // Nous allons cr&eacute;er maintenant une nouvelle bo&icirc;te aux lettres "phptestbox" // dans votre dossier inbox, v&eacute;rifier son &eacute;tat et finalement, la supprimer // pour remettre votre inbox dans son &eacute;tat initial. -if(@imap_createmailbox($mbox,imap_utf7_encode("{your.imap.host}INBOX.$newname"))){ +if (@imap_createmailbox($mbox,imap_utf7_encode("{your.imap.host}INBOX.$newname"))){ $status = @imap_status($mbox,"{your.imap.host}INBOX.$newname",SA_ALL); - if($status) { - print("Votre nouvelle bo&icirc;te '$name1' est dans l'&eacute;tat suivant :<BR>\n"); - print("Messages: ". $status->messages )."<BR>\n"; - print("R&eacute;cent: ". $status->recent )."<BR>\n"; - print("Non lus: ". $status->unseen )."<BR>\n"; - print("UID suivant: ". $status->uidnext )."<BR>\n"; - print("UID validit&eacute;:". $status->uidvalidity)."<BR>\n"; + if ($status) { + echo "Votre nouvelle bo&icirc;te '$name1' est dans l'&eacute;tat suivant :<br />\n"; + echo "Messages : " . $status->messages . "<br />\n"; + echo "R&eacute;cent : " . $status->recent . "<br />\n"; + echo "Non lus : " . $status->unseen . "<br />\n"; + echo "UID suivant : " . $status->uidnext . "<br />\n"; + echo "UID validit&eacute; : " . $status->uidvalidity . "<br />\n"; + if(imap_renamemailbox($mbox,"{your.imap.host}INBOX.$newname","{your.imap.host}INBOX.$name2")) { - echo "renommage de la bo&icirc;te aux lettres '$name1' en '$name2'<BR>\n"; + echo "renommage de la bo&icirc;te aux lettres '$name1' en '$name2'<br />\n"; $newname=$name2; } else { - print "imap_renamemailbox sur la nouvelle bo&icirc;te aux lettres a &eacute;chou&eacute; : ".imap_last_error()."<BR>\n"; + echo "imap_renamemailbox sur la nouvelle bo&icirc;te aux lettres a &eacute;chou&eacute; : " . imap_last_error() . "<br />\n"; } } else { - print "imap_status sur la nouvelle bo&icirc;te aux lettres a &eacute;chou&eacute; : ".imap_last_error()."<BR>\n"; + echo "imap_status sur la nouvelle bo&icirc;te aux lettres a &eacute;chou&eacute; : " . imap_last_error() . "<br />\n"; } if(@imap_deletemailbox($mbox,"{your.imap.host}INBOX.$newname")) { - print "new mailbox supprim&eacute;e pour remettre tout en &eacute;tat<BR>\n"; + echo "new mailbox supprim&eacute;e pour remettre tout en &eacute;tat<br />\n"; } else { - print "imap_deletemailbox ur la nouvelle bo&icirc;te aux lettres a &eacute;chou&eacute; : ".implode("<BR>\n",imap_errors())."<BR>\n"; + echo "imap_deletemailbox ur la nouvelle bo&icirc;te aux lettres a &eacute;chou&eacute; : " . implode("<br />\n", imap_errors()) . "<br />\n"; } } else { - print "Impossible de cr&eacute;er une nouvelle bo&icirc;te aux lettres : ".implode("<BR>\n",imap_errors())."<BR>\n"; + print "Impossible de cr&eacute;er une nouvelle bo&icirc;te aux lettres : " . implode("<br />\n", imap_errors()) . "<br />\n"; } imap_close($mbox); ?> Index: phpdoc-fr/reference/imap/functions/imap-status.xml diff -u phpdoc-fr/reference/imap/functions/imap-status.xml:1.2 phpdoc-fr/reference/imap/functions/imap-status.xml:1.3 --- phpdoc-fr/reference/imap/functions/imap-status.xml:1.2 Sun Apr 20 21:24:41 2003 +++ phpdoc-fr/reference/imap/functions/imap-status.xml Sun Dec 14 18:27:49 2003 @@ -73,13 +73,13 @@ or die("can't connect: ".imap_last_error()); $status = imap_status($mbox,"{your.imap.host}INBOX",SA_ALL); if($status) { - print("Messages: ". $status->messages )."<BR>\n"; - print("R&eacute;cents: ". $status->recent )."<BR>\n"; - print("Non lus: ". $status->unseen )."<BR>\n"; - print("UIDnext: ". $status->uidnext )."<BR>\n"; - print("UIDvalidit&eacute;:". $status->uidvalidity)."<BR>\n"; + echo"Messages: ". $status->messages . "<br />\n"; + echo "R&eacute;cents: ". $status->recent . "<br />\n"; + echo "Non lus: ". $status->unseen . "<br />\n"; + echo "UIDnext: ". $status->uidnext . "<br />\n"; + echo "UIDvalidit&eacute;:". $status->uidvalidity . "<br />\n"; } else { - print "imap_status a &eacute;chou&eacute; : ".imap_last_error()."\n"; + echo "imap_status a &eacute;chou&eacute; : " . imap_last_error() . "\n"; } imap_close($mbox); ?> Index: phpdoc-fr/reference/pgsql/functions/pg-close.xml diff -u phpdoc-fr/reference/pgsql/functions/pg-close.xml:1.3 phpdoc-fr/reference/pgsql/functions/pg-close.xml:1.4 --- phpdoc-fr/reference/pgsql/functions/pg-close.xml:1.3 Tue Jul 15 22:16:06 2003 +++ phpdoc-fr/reference/pgsql/functions/pg-close.xml Sun Dec 14 18:27:50 2003 @@ -33,9 +33,9 @@ <programlisting role="php"> <![CDATA[ <?php - $dbconn = $dbconn = pg_connect ("host=localhost port=5432 dbname=mary") + $dbconn = pg_connect("host=localhost port=5432 dbname=mary") or die("Impossible de se connecter"); - print ("Connexion &agrave; PostGreSQL"); + echo "Connexion &agrave; PostGreSQL"; pg_close($dbconn); ?> ]]> Index: phpdoc-fr/reference/pgsql/functions/pg-get-notify.xml diff -u phpdoc-fr/reference/pgsql/functions/pg-get-notify.xml:1.3 phpdoc-fr/reference/pgsql/functions/pg-get-notify.xml:1.4 --- phpdoc-fr/reference/pgsql/functions/pg-get-notify.xml:1.3 Fri Oct 31 07:32:04 2003 +++ phpdoc-fr/reference/pgsql/functions/pg-get-notify.xml Sun Dec 14 18:27:50 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.pg-get-notify"> <refnamediv> <refname>pg_get_notify</refname> @@ -26,7 +26,7 @@ <programlisting role="php"> <![CDATA[ <?php -$conn = pg_pconnect ("dbname=publisher"); +$conn = pg_pconnect("dbname=publisher"); if (!$conn) { echo "Une erreur est survenue.\n"; exit; @@ -36,7 +36,7 @@ pg_query($conn, 'LISTEN author_updated;'); $notify = pg_get_notify($conn); if (!$notify) - print("Aucun message\n"); + echo "Aucun message\n"; else print_r($notify); ?> Index: phpdoc-fr/reference/xslt/functions/xslt-error.xml diff -u phpdoc-fr/reference/xslt/functions/xslt-error.xml:1.2 phpdoc-fr/reference/xslt/functions/xslt-error.xml:1.3 --- phpdoc-fr/reference/xslt/functions/xslt-error.xml:1.2 Mon Jun 9 11:38:28 2003 +++ phpdoc-fr/reference/xslt/functions/xslt-error.xml Sun Dec 14 18:27:51 2003 @@ -33,7 +33,7 @@ xslt_errno($xh), xslt_error($xh))); } -print($result); +echo $result; xslt_free($xh); ?> @@ -41,6 +41,9 @@ </programlisting> </example> </para> + <para> + Voir aussi + <function>xslt_errno</function>. </refsect1> </refentry> Index: phpdoc-fr/reference/xslt/functions/xslt-set-log.xml diff -u phpdoc-fr/reference/xslt/functions/xslt-set-log.xml:1.2 phpdoc-fr/reference/xslt/functions/xslt-set-log.xml:1.3 --- phpdoc-fr/reference/xslt/functions/xslt-set-log.xml:1.2 Tue Jul 15 22:13:11 2003 +++ phpdoc-fr/reference/xslt/functions/xslt-set-log.xml Sun Dec 14 18:27:51 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 --> <refentry id="function.xslt-set-log"> <refnamediv> @@ -58,7 +58,7 @@ xslt_set_log($xh, getcwd() . 'mon_fichier.log'); $result = xslt_process($xh, 'chien.xml', 'animal.xsl'); -print($result); +echo $result; xslt_free($xh); ?>
« previous php.doc.fr (#1009) next »