cvs: phpdoc-fr /reference/filesystem/functions ftruncate.xml glob.xml is-link.xml is-uploaded-file.xml lchgrp.xml lchown.xml link.xml lstat.xml
move-uploaded-file.xml parse-ini-file.xml pclose.xml readfile.xml realpath.xml rewind.xml rmdir.xml stat.xml symlink.xml tempnam.xml touch.xml
unlink.xml
| From: | Yannick Torres | Date: | Mon, 08 Dec 2008 16:01:18 +0000 |
| Subject: | cvs: phpdoc-fr /reference/filesystem/functions ftruncate.xml glob.xml is-link.xml is-uploaded-file.xml lchgrp.xml lchown.xml link.xml lstat.xml move-uploaded-file.xml parse-ini-file.xml pclose.xml readfile.xml realpath.xml rewind.xml rmdir.xml stat.xml symlink.xml tempnam.xml touch.xml unlink.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-6150@lists.php.net to get a copy of this message | ||
yannick Mon Dec 8 16:01:18 2008 UTC
Modified files:
/phpdoc-fr/reference/filesystem/functions ftruncate.xml glob.xml
is-link.xml
is-uploaded-file.xml
lchgrp.xml lchown.xml
link.xml lstat.xml
move-uploaded-file.xml
parse-ini-file.xml
pclose.xml readfile.xml
realpath.xml rewind.xml
rmdir.xml stat.xml
symlink.xml tempnam.xml
touch.xml unlink.xml
Log:
sync with EN
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/ftruncate.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/ftruncate.xml diff -u phpdoc-fr/reference/filesystem/functions/ftruncate.xml:1.17 phpdoc-fr/reference/filesystem/functions/ftruncate.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/ftruncate.xml:1.17 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/ftruncate.xml Mon Dec 8 16:01:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.15 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ftruncate"> @@ -20,6 +20,7 @@ tronque à la taille de <parameter>size</parameter>. </para> </refsect1> + <refsect1 role="parameters"> &reftitle.parameters; <para> @@ -59,12 +60,14 @@ </variablelist> </para> </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + <refsect1 role="changelog"> &reftitle.changelog; <para> @@ -90,6 +93,29 @@ </informaltable> </para> </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>ftruncate</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'lorem_ipsum.txt'; + +$handle = fopen($filename, 'r+'); +ftruncate($handle, rand(1, filesize($filename))); +rewind($handle); +echo fread($handle, filesize($filename)); +fclose($handle); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -97,7 +123,8 @@ Le pointeur de fichier n'est <emphasis>pas</emphasis> modifié. </para> </note> - </refsect1> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/glob.xml?r1=1.24&r2=1.25&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/glob.xml diff -u phpdoc-fr/reference/filesystem/functions/glob.xml:1.24 phpdoc-fr/reference/filesystem/functions/glob.xml:1.25 --- phpdoc-fr/reference/filesystem/functions/glob.xml:1.24 Wed May 21 18:17:48 2008 +++ phpdoc-fr/reference/filesystem/functions/glob.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.24 $ --> -<!-- EN-Revision: 1.27 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.25 $ --> +<!-- EN-Revision: 1.28 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.glob"> @@ -45,7 +45,7 @@ <itemizedlist> <listitem> <simpara> - <constant>GLOB_MARK</constant> : Ajoute un slash final à chaque élément retourné + <constant>GLOB_MARK</constant> : Ajoute un slash final à chaque dossier retourné </simpara> </listitem> <listitem> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/is-link.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/is-link.xml diff -u phpdoc-fr/reference/filesystem/functions/is-link.xml:1.15 phpdoc-fr/reference/filesystem/functions/is-link.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/is-link.xml:1.15 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/is-link.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-link"> @@ -44,6 +44,31 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Création et vérification d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$link = 'uploads'; + +if(is_link($link)) +{ + echo(readlink($link)); +} +else +{ + symlink('uploads.php', $link); +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml diff -u phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml:1.18 phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml:1.19 --- phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml:1.18 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> -<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.19 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-uploaded-file"> @@ -28,8 +28,9 @@ </para> <para> Pour un fonctionnement correct, la fonction <function>is_uploaded_file</function> - nécessite un argument comme $_FILES['userfile']['tmp_name'], - le nom du fichier - téléchargé sur la machine cliente $_FILES['userfile']['name'] ne fonctionne pas. + nécessite un argument comme <varname>$_FILES['userfile']['tmp_name']</varname>, - + le nom du fichier téléchargé sur la machine cliente + <varname>$_FILES['userfile']['name']</varname> ne fonctionne pas. </para> </refsect1> @@ -85,6 +86,7 @@ <para> <simplelist> <member><function>move_uploaded_file</function></member> + <member><varname>$_FILES</varname></member> <member>Voir la section sur <link linkend="features.file-upload">la gestion des téléchargements</link> pour un exemple d'utilisation simple.</member> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/lchgrp.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/lchgrp.xml diff -u phpdoc-fr/reference/filesystem/functions/lchgrp.xml:1.6 phpdoc-fr/reference/filesystem/functions/lchgrp.xml:1.7 --- phpdoc-fr/reference/filesystem/functions/lchgrp.xml:1.6 Sat May 31 07:07:35 2008 +++ phpdoc-fr/reference/filesystem/functions/lchgrp.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lchgrp"> @@ -59,6 +59,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Modification du groupe d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$target = 'output.php'; +$link = 'output.html'; +symlink($target, $link); + +lchgroup($link, 8); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/lchown.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/lchown.xml diff -u phpdoc-fr/reference/filesystem/functions/lchown.xml:1.6 phpdoc-fr/reference/filesystem/functions/lchown.xml:1.7 --- phpdoc-fr/reference/filesystem/functions/lchown.xml:1.6 Sat May 31 07:07:35 2008 +++ phpdoc-fr/reference/filesystem/functions/lchown.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lchown"> @@ -57,6 +57,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Modification du propriétaire d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$target = 'output.php'; +$link = 'output.html'; +symlink($target, $link); + +lchown($link, 8); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; @@ -68,7 +88,7 @@ &reftitle.seealso; <para> <simplelist> - <member><function>chgrp</function></member> + <member><function>chown</function></member> <member><function>lchgrp</function></member> <member><function>chgrp</function></member> <member><function>chmod</function></member> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/link.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/link.xml diff -u phpdoc-fr/reference/filesystem/functions/link.xml:1.17 phpdoc-fr/reference/filesystem/functions/link.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/link.xml:1.17 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/link.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.link"> @@ -52,6 +52,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Création d'un lien</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$source = 'source.ext'; // Ceci est le fichier qui existe actuellement +$dest = 'newfile.ext'; // Ceci sera le nom du fichier que vous voulez lier + +link($source, $dest); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/lstat.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/lstat.xml diff -u phpdoc-fr/reference/filesystem/functions/lstat.xml:1.15 phpdoc-fr/reference/filesystem/functions/lstat.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/lstat.xml:1.15 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/lstat.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lstat"> @@ -47,6 +47,43 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Comparaison entre <function>stat</function> et <function>lstat</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +symlink('uploads.php', 'uploads'); + +// On met en évidence la différence d'informations +array_diff(stat('uploads'), lstat('uploads')); +?> +]]> + </programlisting> + &example.outputs.similar; + <para> + Informations qui diffèrent entre les 2 fichiers. + </para> + <screen> +<![CDATA[ +Array +( + [ino] => 97236376 + [mode] => 33188 + [size] => 34 + [atime] => 1223580003 + [mtime] => 1223581848 + [ctime] => 1223581848 + [blocks] => 8 +) +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml diff -u phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml:1.17 phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml:1.17 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.move-uploaded-file"> @@ -67,6 +67,29 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Téléchargement de plusieurs fichiers</title> + <programlisting role="php"> +<![CDATA[ +<?php +$uploads_dir = '/uploads'; +foreach ($_FILES["pictures"]["error"] as $key => $error) { + if ($error == UPLOAD_ERR_OK) { + $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; + $name = $_FILES["pictures"]["name"][$key]; + move_uploaded_file($tmp_name, "$uploads_dir/$name"); + } +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml?r1=1.29&r2=1.30&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml diff -u phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml:1.29 phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml:1.30 --- phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml:1.29 Sun Apr 13 15:39:03 2008 +++ phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.29 $ --> -<!-- EN-Revision: 1.29 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.30 $ --> +<!-- EN-Revision: 1.30 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-ini-file"> @@ -58,7 +58,8 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - La configuration est retournée sous la forme d'un tableau associatif. + La configuration est retournée sous la forme d'un tableau associatif + en cas de succès, et &false; si une erreur survient. </para> </refsect1> @@ -75,6 +76,13 @@ </thead> <tbody> <row> + <entry>5.2.7</entry> + <entry> + En cas d'erreur de syntaxe, la fonction retourne maintenant &false; + au lieu d'un tableau vide. + </entry> + </row> + <row> <entry>5.2.4</entry> <entry> Les noms de section et les clés, composés de numéros, sont http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/pclose.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/pclose.xml diff -u phpdoc-fr/reference/filesystem/functions/pclose.xml:1.13 phpdoc-fr/reference/filesystem/functions/pclose.xml:1.14 --- phpdoc-fr/reference/filesystem/functions/pclose.xml:1.13 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/pclose.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.14 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pclose"> @@ -45,6 +45,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>pclose</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$handle = popen('/bin/ls', 'r'); +pclose($handle); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/readfile.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/readfile.xml diff -u phpdoc-fr/reference/filesystem/functions/readfile.xml:1.16 phpdoc-fr/reference/filesystem/functions/readfile.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/readfile.xml:1.16 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/readfile.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.readfile"> @@ -66,6 +66,43 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Forcer le téléchargement en utilisant <function>readfile</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'monkey.gif'; + +if (file_exists($file)) { + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename='.basename($file)); + header('Content-Transfer-Encoding: binary'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Length: ' . filesize($file)); + ob_clean(); + flush(); + readfile($file); + exit; +} +?> +]]> + </programlisting> + &example.outputs.similar; + <mediaobject> + <imageobject> + <imagedata fileref="figures/filesystem.readfile.png"/> + </imageobject> + </mediaobject> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; &tip.fopen-wrapper; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/realpath.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/realpath.xml diff -u phpdoc-fr/reference/filesystem/functions/realpath.xml:1.17 phpdoc-fr/reference/filesystem/functions/realpath.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/realpath.xml:1.17 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/realpath.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.realpath"> @@ -48,10 +48,33 @@ </para> <para> <function>realpath</function> retourne &false; si une erreur survient, e.g. - si le fichier n'existe pas. Sous les systèmes BSD, <function>realpath</function> - n'échouera pas s'il manque que le dernier composant du paramètre - <parameter>path</parameter>, alors que les autres systèmes retourneront - &false;. + si le fichier n'existe pas. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Avant cette version, <function>realpath</function> n'échouera pas + sous les systèmes *BSD que si le dernier <parameter>path</parameter> + n'existe pas. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/rewind.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/rewind.xml diff -u phpdoc-fr/reference/filesystem/functions/rewind.xml:1.17 phpdoc-fr/reference/filesystem/functions/rewind.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/rewind.xml:1.17 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/rewind.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.rewind"> @@ -52,12 +52,45 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>rewind</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$handle = fopen('output.txt', 'r+'); + +fwrite($handle, 'Really long sentence.'); +rewind($handle); +fwrite($handle, 'Foo'); +rewind($handle); + +echo fread($handle, filesize('output.txt')); + +fclose($handle); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Foolly long sentence. +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> + <member><function>fread</function></member> <member><function>fseek</function></member> <member><function>ftell</function></member> + <member><function>fwrite</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/rmdir.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/rmdir.xml diff -u phpdoc-fr/reference/filesystem/functions/rmdir.xml:1.18 phpdoc-fr/reference/filesystem/functions/rmdir.xml:1.19 --- phpdoc-fr/reference/filesystem/functions/rmdir.xml:1.18 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/rmdir.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> -<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.19 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.rmdir"> @@ -79,6 +79,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>rmdir</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +if (!is_dir('examples')) { + mkdir('examples'); +} + +rmdir('examples'); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.sm.uidcheck.dir; @@ -88,6 +108,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>is_dir</function></member> <member><function>mkdir</function></member> <member><function>unlink</function></member> </simplelist> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/stat.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/stat.xml diff -u phpdoc-fr/reference/filesystem/functions/stat.xml:1.23 phpdoc-fr/reference/filesystem/functions/stat.xml:1.24 --- phpdoc-fr/reference/filesystem/functions/stat.xml:1.23 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/stat.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23 $ --> -<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.24 $ --> +<!-- EN-Revision: 1.24 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stat"> @@ -66,7 +66,7 @@ <row> <entry>1</entry> <entry>ino</entry> - <entry>inode</entry> + <entry>Numéro d'inode (*)</entry> </row> <row> <entry>2</entry> @@ -81,17 +81,17 @@ <row> <entry>4</entry> <entry>uid</entry> - <entry>userid du propriétaire</entry> + <entry>userid du propriétaire (*)</entry> </row> <row> <entry>5</entry> <entry>gid</entry> - <entry>groupid du propriétaire</entry> + <entry>groupid du propriétaire (*)</entry> </row> <row> <entry>6</entry> <entry>rdev</entry> - <entry>type du volume, si le volume est une inode (*)</entry> + <entry>type du volume, si le volume est une inode</entry> </row> <row> <entry>7</entry> @@ -116,16 +116,19 @@ <row> <entry>11</entry> <entry>blksize</entry> - <entry>taille de bloc (*)</entry> + <entry>taille de bloc (**)</entry> </row> <row> <entry>12</entry> <entry>blocks</entry> - <entry>nombre de blocs alloués (*)</entry> + <entry>nombre de blocs alloués (**)</entry> </row> </tbody> </tgroup> </table> + * - Sous Windows, vaudra toujours 0. + </para> + <para> * - uniquement sur les systèmes qui supportent le type <literal>st_blksize</literal>. Les autres systèmes (e.g. Windows) retournent -1. </para> @@ -168,8 +171,77 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>stat</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Récupération des informations */ +$stat = stat('C:\php\php.exe'); + +/* + * Affichage de la date et heure de l'accès à ce fichier, + * identique à l'appel à la fonction fileatime() + */ +echo 'Date et heure d\'accès : ' . $stat['atime']; + +/* + * Affiche de la date et heure de modification du fichier, + * identique à l'appel à la fonction filemtime() + */ +echo 'Date et heure de modification : ' . $stat['mtime']; + +/* Affichage du numéro du device */ +echo 'Numéro du Device : ' . $stat['dev']; +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>Utilisation des informations issues de <function>stat</function> + conjointement avec la fonction <function>touch</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Récupération des informations issues de la fonction stat */ +$stat = @stat('C:\php\php.exe'); + +/* L'accès aux informations a-t-il échoué ? */ +if(!$stat) +{ + echo 'L\'appel à stat() a échoué...'; +} +else +{ + /* + * Nous voulons que la date et heure d'accès soit d'une semaine avant la date courante. + */ + $atime = $stat['atime'] + 604800; + + /* Touchons le fichier ! */ + if(!@touch('some_file.txt', time(), $atime)) + { + echo 'Échec lors de l\'appel à la fonction touch()...'; + } + else + { + echo 'La fonction touch() a réussi...'; + } +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/symlink.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/symlink.xml diff -u phpdoc-fr/reference/filesystem/functions/symlink.xml:1.17 phpdoc-fr/reference/filesystem/functions/symlink.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/symlink.xml:1.17 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/symlink.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.symlink"> @@ -46,6 +46,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Création d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$target = 'uploads.php'; +$link = 'uploads'; +symlink($target, $link); + +echo(readlink($link)); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/tempnam.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/tempnam.xml diff -u phpdoc-fr/reference/filesystem/functions/tempnam.xml:1.23 phpdoc-fr/reference/filesystem/functions/tempnam.xml:1.24 --- phpdoc-fr/reference/filesystem/functions/tempnam.xml:1.23 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/tempnam.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23 $ --> -<!-- EN-Revision: 1.15 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.24 $ --> +<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.tempnam"> @@ -42,6 +42,11 @@ <para> Le préfixe du fichier temporaire généré. </para> + <note> + <simpara> + Windows utilise seulement les 3 premiers caractères du préfixe. + </simpara> + </note> </listitem> </varlistentry> </variablelist> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/touch.xml?r1=1.19&r2=1.20&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/touch.xml diff -u phpdoc-fr/reference/filesystem/functions/touch.xml:1.19 phpdoc-fr/reference/filesystem/functions/touch.xml:1.20 --- phpdoc-fr/reference/filesystem/functions/touch.xml:1.19 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/touch.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.20 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.touch"> @@ -70,6 +70,31 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Il devient possible de changer la date et heure de modification d'un + dossier sous Windows. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -90,14 +115,42 @@ </programlisting> </example> </para> + <para> + <example> + <title>Exemple avec <function>touch</function> en utilisant le paramètre + <parameter>time</parameter></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* + * Ceci est la date et heure du dernier accès, nous y ajoutons 1 heure + * dans le passé. + */ +$time = time() - 3600; + +/* Touchons le fichier ! */ +if(!touch('some_file.txt', $time)) +{ + echo 'Whoops, une erreur est survenue...'; +} +else +{ + echo 'L\'appel à la fonction touch() a réussi'; +} +?> +]]> + </programlisting> + </example> + </para> </refsect1> <refsect1 role="notes"> &reftitle.notes; + ¬e.filesystem-time-res; <warning> <para> - Il n'est pour le moment pas possible de changer la date - de modification d'un dossier avec cette fonction sous Windows. + Avant la version 5.3.0 de PHP, il n'était pas possible de changer la + date et heure de modification d'un dossier avec cette fonction sous Windows. </para> </warning> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/unlink.xml?r1=1.20&r2=1.21&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/unlink.xml diff -u phpdoc-fr/reference/filesystem/functions/unlink.xml:1.20 phpdoc-fr/reference/filesystem/functions/unlink.xml:1.21 --- phpdoc-fr/reference/filesystem/functions/unlink.xml:1.20 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/unlink.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.20 $ --> -<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.21 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.unlink"> @@ -78,6 +78,29 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>unlink</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$fh = fopen('test.html', 'a'); +fwrite($fh, '<h1>Hello world!</h1>'); +fclose($fh); + +mkdir('testdir', 0777); + +unlink('test.html'); +unlink('testdir'); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/ftruncate.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/ftruncate.xml diff -u phpdoc-fr/reference/filesystem/functions/ftruncate.xml:1.17 phpdoc-fr/reference/filesystem/functions/ftruncate.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/ftruncate.xml:1.17 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/ftruncate.xml Mon Dec 8 16:01:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.15 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ftruncate"> @@ -20,6 +20,7 @@ tronque à la taille de <parameter>size</parameter>. </para> </refsect1> + <refsect1 role="parameters"> &reftitle.parameters; <para> @@ -59,12 +60,14 @@ </variablelist> </para> </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + <refsect1 role="changelog"> &reftitle.changelog; <para> @@ -90,6 +93,29 @@ </informaltable> </para> </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>ftruncate</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'lorem_ipsum.txt'; + +$handle = fopen($filename, 'r+'); +ftruncate($handle, rand(1, filesize($filename))); +rewind($handle); +echo fread($handle, filesize($filename)); +fclose($handle); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -97,7 +123,8 @@ Le pointeur de fichier n'est <emphasis>pas</emphasis> modifié. </para> </note> - </refsect1> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/glob.xml?r1=1.24&r2=1.25&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/glob.xml diff -u phpdoc-fr/reference/filesystem/functions/glob.xml:1.24 phpdoc-fr/reference/filesystem/functions/glob.xml:1.25 --- phpdoc-fr/reference/filesystem/functions/glob.xml:1.24 Wed May 21 18:17:48 2008 +++ phpdoc-fr/reference/filesystem/functions/glob.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.24 $ --> -<!-- EN-Revision: 1.27 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.25 $ --> +<!-- EN-Revision: 1.28 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.glob"> @@ -45,7 +45,7 @@ <itemizedlist> <listitem> <simpara> - <constant>GLOB_MARK</constant> : Ajoute un slash final à chaque élément retourné + <constant>GLOB_MARK</constant> : Ajoute un slash final à chaque dossier retourné </simpara> </listitem> <listitem> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/is-link.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/is-link.xml diff -u phpdoc-fr/reference/filesystem/functions/is-link.xml:1.15 phpdoc-fr/reference/filesystem/functions/is-link.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/is-link.xml:1.15 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/is-link.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-link"> @@ -44,6 +44,31 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Création et vérification d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$link = 'uploads'; + +if(is_link($link)) +{ + echo(readlink($link)); +} +else +{ + symlink('uploads.php', $link); +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml diff -u phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml:1.18 phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml:1.19 --- phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml:1.18 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/is-uploaded-file.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> -<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.19 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.is-uploaded-file"> @@ -28,8 +28,9 @@ </para> <para> Pour un fonctionnement correct, la fonction <function>is_uploaded_file</function> - nécessite un argument comme $_FILES['userfile']['tmp_name'], - le nom du fichier - téléchargé sur la machine cliente $_FILES['userfile']['name'] ne fonctionne pas. + nécessite un argument comme <varname>$_FILES['userfile']['tmp_name']</varname>, - + le nom du fichier téléchargé sur la machine cliente + <varname>$_FILES['userfile']['name']</varname> ne fonctionne pas. </para> </refsect1> @@ -85,6 +86,7 @@ <para> <simplelist> <member><function>move_uploaded_file</function></member> + <member><varname>$_FILES</varname></member> <member>Voir la section sur <link linkend="features.file-upload">la gestion des téléchargements</link> pour un exemple d'utilisation simple.</member> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/lchgrp.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/lchgrp.xml diff -u phpdoc-fr/reference/filesystem/functions/lchgrp.xml:1.6 phpdoc-fr/reference/filesystem/functions/lchgrp.xml:1.7 --- phpdoc-fr/reference/filesystem/functions/lchgrp.xml:1.6 Sat May 31 07:07:35 2008 +++ phpdoc-fr/reference/filesystem/functions/lchgrp.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lchgrp"> @@ -59,6 +59,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Modification du groupe d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$target = 'output.php'; +$link = 'output.html'; +symlink($target, $link); + +lchgroup($link, 8); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/lchown.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/lchown.xml diff -u phpdoc-fr/reference/filesystem/functions/lchown.xml:1.6 phpdoc-fr/reference/filesystem/functions/lchown.xml:1.7 --- phpdoc-fr/reference/filesystem/functions/lchown.xml:1.6 Sat May 31 07:07:35 2008 +++ phpdoc-fr/reference/filesystem/functions/lchown.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lchown"> @@ -57,6 +57,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Modification du propriétaire d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$target = 'output.php'; +$link = 'output.html'; +symlink($target, $link); + +lchown($link, 8); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; @@ -68,7 +88,7 @@ &reftitle.seealso; <para> <simplelist> - <member><function>chgrp</function></member> + <member><function>chown</function></member> <member><function>lchgrp</function></member> <member><function>chgrp</function></member> <member><function>chmod</function></member> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/link.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/link.xml diff -u phpdoc-fr/reference/filesystem/functions/link.xml:1.17 phpdoc-fr/reference/filesystem/functions/link.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/link.xml:1.17 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/link.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.link"> @@ -52,6 +52,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Création d'un lien</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$source = 'source.ext'; // Ceci est le fichier qui existe actuellement +$dest = 'newfile.ext'; // Ceci sera le nom du fichier que vous voulez lier + +link($source, $dest); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.no-remote; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/lstat.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/lstat.xml diff -u phpdoc-fr/reference/filesystem/functions/lstat.xml:1.15 phpdoc-fr/reference/filesystem/functions/lstat.xml:1.16 --- phpdoc-fr/reference/filesystem/functions/lstat.xml:1.15 Sun Apr 6 18:46:47 2008 +++ phpdoc-fr/reference/filesystem/functions/lstat.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lstat"> @@ -47,6 +47,43 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Comparaison entre <function>stat</function> et <function>lstat</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +symlink('uploads.php', 'uploads'); + +// On met en évidence la différence d'informations +array_diff(stat('uploads'), lstat('uploads')); +?> +]]> + </programlisting> + &example.outputs.similar; + <para> + Informations qui diffèrent entre les 2 fichiers. + </para> + <screen> +<![CDATA[ +Array +( + [ino] => 97236376 + [mode] => 33188 + [size] => 34 + [atime] => 1223580003 + [mtime] => 1223581848 + [ctime] => 1223581848 + [blocks] => 8 +) +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.clearstatcache; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml diff -u phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml:1.17 phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml:1.17 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/move-uploaded-file.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.move-uploaded-file"> @@ -67,6 +67,29 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Téléchargement de plusieurs fichiers</title> + <programlisting role="php"> +<![CDATA[ +<?php +$uploads_dir = '/uploads'; +foreach ($_FILES["pictures"]["error"] as $key => $error) { + if ($error == UPLOAD_ERR_OK) { + $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; + $name = $_FILES["pictures"]["name"][$key]; + move_uploaded_file($tmp_name, "$uploads_dir/$name"); + } +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml?r1=1.29&r2=1.30&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml diff -u phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml:1.29 phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml:1.30 --- phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml:1.29 Sun Apr 13 15:39:03 2008 +++ phpdoc-fr/reference/filesystem/functions/parse-ini-file.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.29 $ --> -<!-- EN-Revision: 1.29 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.30 $ --> +<!-- EN-Revision: 1.30 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-ini-file"> @@ -58,7 +58,8 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - La configuration est retournée sous la forme d'un tableau associatif. + La configuration est retournée sous la forme d'un tableau associatif + en cas de succès, et &false; si une erreur survient. </para> </refsect1> @@ -75,6 +76,13 @@ </thead> <tbody> <row> + <entry>5.2.7</entry> + <entry> + En cas d'erreur de syntaxe, la fonction retourne maintenant &false; + au lieu d'un tableau vide. + </entry> + </row> + <row> <entry>5.2.4</entry> <entry> Les noms de section et les clés, composés de numéros, sont http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/pclose.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/pclose.xml diff -u phpdoc-fr/reference/filesystem/functions/pclose.xml:1.13 phpdoc-fr/reference/filesystem/functions/pclose.xml:1.14 --- phpdoc-fr/reference/filesystem/functions/pclose.xml:1.13 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/pclose.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.14 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pclose"> @@ -45,6 +45,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>pclose</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$handle = popen('/bin/ls', 'r'); +pclose($handle); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/readfile.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/readfile.xml diff -u phpdoc-fr/reference/filesystem/functions/readfile.xml:1.16 phpdoc-fr/reference/filesystem/functions/readfile.xml:1.17 --- phpdoc-fr/reference/filesystem/functions/readfile.xml:1.16 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/readfile.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.17 $ --> +<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.readfile"> @@ -66,6 +66,43 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Forcer le téléchargement en utilisant <function>readfile</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'monkey.gif'; + +if (file_exists($file)) { + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename='.basename($file)); + header('Content-Transfer-Encoding: binary'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Length: ' . filesize($file)); + ob_clean(); + flush(); + readfile($file); + exit; +} +?> +]]> + </programlisting> + &example.outputs.similar; + <mediaobject> + <imageobject> + <imagedata fileref="figures/filesystem.readfile.png"/> + </imageobject> + </mediaobject> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; &tip.fopen-wrapper; http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/realpath.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/realpath.xml diff -u phpdoc-fr/reference/filesystem/functions/realpath.xml:1.17 phpdoc-fr/reference/filesystem/functions/realpath.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/realpath.xml:1.17 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/realpath.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.realpath"> @@ -48,10 +48,33 @@ </para> <para> <function>realpath</function> retourne &false; si une erreur survient, e.g. - si le fichier n'existe pas. Sous les systèmes BSD, <function>realpath</function> - n'échouera pas s'il manque que le dernier composant du paramètre - <parameter>path</parameter>, alors que les autres systèmes retourneront - &false;. + si le fichier n'existe pas. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Avant cette version, <function>realpath</function> n'échouera pas + sous les systèmes *BSD que si le dernier <parameter>path</parameter> + n'existe pas. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/rewind.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/rewind.xml diff -u phpdoc-fr/reference/filesystem/functions/rewind.xml:1.17 phpdoc-fr/reference/filesystem/functions/rewind.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/rewind.xml:1.17 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/rewind.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.rewind"> @@ -52,12 +52,45 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>rewind</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$handle = fopen('output.txt', 'r+'); + +fwrite($handle, 'Really long sentence.'); +rewind($handle); +fwrite($handle, 'Foo'); +rewind($handle); + +echo fread($handle, filesize('output.txt')); + +fclose($handle); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Foolly long sentence. +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> + <member><function>fread</function></member> <member><function>fseek</function></member> <member><function>ftell</function></member> + <member><function>fwrite</function></member> </simplelist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/rmdir.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/rmdir.xml diff -u phpdoc-fr/reference/filesystem/functions/rmdir.xml:1.18 phpdoc-fr/reference/filesystem/functions/rmdir.xml:1.19 --- phpdoc-fr/reference/filesystem/functions/rmdir.xml:1.18 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/rmdir.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> -<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.19 $ --> +<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.rmdir"> @@ -79,6 +79,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>rmdir</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +if (!is_dir('examples')) { + mkdir('examples'); +} + +rmdir('examples'); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; ¬e.sm.uidcheck.dir; @@ -88,6 +108,7 @@ &reftitle.seealso; <para> <simplelist> + <member><function>is_dir</function></member> <member><function>mkdir</function></member> <member><function>unlink</function></member> </simplelist> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/stat.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/stat.xml diff -u phpdoc-fr/reference/filesystem/functions/stat.xml:1.23 phpdoc-fr/reference/filesystem/functions/stat.xml:1.24 --- phpdoc-fr/reference/filesystem/functions/stat.xml:1.23 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/stat.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23 $ --> -<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.24 $ --> +<!-- EN-Revision: 1.24 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stat"> @@ -66,7 +66,7 @@ <row> <entry>1</entry> <entry>ino</entry> - <entry>inode</entry> + <entry>Numéro d'inode (*)</entry> </row> <row> <entry>2</entry> @@ -81,17 +81,17 @@ <row> <entry>4</entry> <entry>uid</entry> - <entry>userid du propriétaire</entry> + <entry>userid du propriétaire (*)</entry> </row> <row> <entry>5</entry> <entry>gid</entry> - <entry>groupid du propriétaire</entry> + <entry>groupid du propriétaire (*)</entry> </row> <row> <entry>6</entry> <entry>rdev</entry> - <entry>type du volume, si le volume est une inode (*)</entry> + <entry>type du volume, si le volume est une inode</entry> </row> <row> <entry>7</entry> @@ -116,16 +116,19 @@ <row> <entry>11</entry> <entry>blksize</entry> - <entry>taille de bloc (*)</entry> + <entry>taille de bloc (**)</entry> </row> <row> <entry>12</entry> <entry>blocks</entry> - <entry>nombre de blocs alloués (*)</entry> + <entry>nombre de blocs alloués (**)</entry> </row> </tbody> </tgroup> </table> + * - Sous Windows, vaudra toujours 0. + </para> + <para> * - uniquement sur les systèmes qui supportent le type <literal>st_blksize</literal>. Les autres systèmes (e.g. Windows) retournent -1. </para> @@ -168,8 +171,77 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>stat</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Récupération des informations */ +$stat = stat('C:\php\php.exe'); + +/* + * Affichage de la date et heure de l'accès à ce fichier, + * identique à l'appel à la fonction fileatime() + */ +echo 'Date et heure d\'accès : ' . $stat['atime']; + +/* + * Affiche de la date et heure de modification du fichier, + * identique à l'appel à la fonction filemtime() + */ +echo 'Date et heure de modification : ' . $stat['mtime']; + +/* Affichage du numéro du device */ +echo 'Numéro du Device : ' . $stat['dev']; +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>Utilisation des informations issues de <function>stat</function> + conjointement avec la fonction <function>touch</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Récupération des informations issues de la fonction stat */ +$stat = @stat('C:\php\php.exe'); + +/* L'accès aux informations a-t-il échoué ? */ +if(!$stat) +{ + echo 'L\'appel à stat() a échoué...'; +} +else +{ + /* + * Nous voulons que la date et heure d'accès soit d'une semaine avant la date courante. + */ + $atime = $stat['atime'] + 604800; + + /* Touchons le fichier ! */ + if(!@touch('some_file.txt', time(), $atime)) + { + echo 'Échec lors de l\'appel à la fonction touch()...'; + } + else + { + echo 'La fonction touch() a réussi...'; + } +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; + ¬e.filesystem-time-res; ¬e.clearstatcache; &tip.fopen-wrapper.stat; </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/symlink.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/symlink.xml diff -u phpdoc-fr/reference/filesystem/functions/symlink.xml:1.17 phpdoc-fr/reference/filesystem/functions/symlink.xml:1.18 --- phpdoc-fr/reference/filesystem/functions/symlink.xml:1.17 Fri Apr 11 14:08:36 2008 +++ phpdoc-fr/reference/filesystem/functions/symlink.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> -<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.18 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.symlink"> @@ -46,6 +46,26 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Création d'un lien symbolique</title> + <programlisting role="php"> +<![CDATA[ +<?php +$target = 'uploads.php'; +$link = 'uploads'; +symlink($target, $link); + +echo(readlink($link)); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/tempnam.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/tempnam.xml diff -u phpdoc-fr/reference/filesystem/functions/tempnam.xml:1.23 phpdoc-fr/reference/filesystem/functions/tempnam.xml:1.24 --- phpdoc-fr/reference/filesystem/functions/tempnam.xml:1.23 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/tempnam.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23 $ --> -<!-- EN-Revision: 1.15 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.24 $ --> +<!-- EN-Revision: 1.16 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.tempnam"> @@ -42,6 +42,11 @@ <para> Le préfixe du fichier temporaire généré. </para> + <note> + <simpara> + Windows utilise seulement les 3 premiers caractères du préfixe. + </simpara> + </note> </listitem> </varlistentry> </variablelist> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/touch.xml?r1=1.19&r2=1.20&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/touch.xml diff -u phpdoc-fr/reference/filesystem/functions/touch.xml:1.19 phpdoc-fr/reference/filesystem/functions/touch.xml:1.20 --- phpdoc-fr/reference/filesystem/functions/touch.xml:1.19 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/touch.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.14 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.20 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.touch"> @@ -70,6 +70,31 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Il devient possible de changer la date et heure de modification d'un + dossier sous Windows. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -90,14 +115,42 @@ </programlisting> </example> </para> + <para> + <example> + <title>Exemple avec <function>touch</function> en utilisant le paramètre + <parameter>time</parameter></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* + * Ceci est la date et heure du dernier accès, nous y ajoutons 1 heure + * dans le passé. + */ +$time = time() - 3600; + +/* Touchons le fichier ! */ +if(!touch('some_file.txt', $time)) +{ + echo 'Whoops, une erreur est survenue...'; +} +else +{ + echo 'L\'appel à la fonction touch() a réussi'; +} +?> +]]> + </programlisting> + </example> + </para> </refsect1> <refsect1 role="notes"> &reftitle.notes; + ¬e.filesystem-time-res; <warning> <para> - Il n'est pour le moment pas possible de changer la date - de modification d'un dossier avec cette fonction sous Windows. + Avant la version 5.3.0 de PHP, il n'était pas possible de changer la + date et heure de modification d'un dossier avec cette fonction sous Windows. </para> </warning> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/filesystem/functions/unlink.xml?r1=1.20&r2=1.21&diff_format=u Index: phpdoc-fr/reference/filesystem/functions/unlink.xml diff -u phpdoc-fr/reference/filesystem/functions/unlink.xml:1.20 phpdoc-fr/reference/filesystem/functions/unlink.xml:1.21 --- phpdoc-fr/reference/filesystem/functions/unlink.xml:1.20 Sat Jun 21 20:51:32 2008 +++ phpdoc-fr/reference/filesystem/functions/unlink.xml Mon Dec 8 16:01:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.20 $ --> -<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.21 $ --> +<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.unlink"> @@ -78,6 +78,29 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>unlink</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$fh = fopen('test.html', 'a'); +fwrite($fh, '<h1>Hello world!</h1>'); +fclose($fh); + +mkdir('testdir', 0777); + +unlink('test.html'); +unlink('testdir'); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>