cvs: phpdoc-nl /reference/filesystem/functions fgets.xml fgetss.xml file-exists.xml file.xml filegroup.xml
| From: | Patric Stout | Date: | Fri, 03 Jan 2003 15:48:20 +0000 |
| Subject: | cvs: phpdoc-nl /reference/filesystem/functions fgets.xml fgetss.xml file-exists.xml file.xml filegroup.xml | ||
| Groups: | php.doc.nl | ||
| Request: | Send a blank email to doc-nl+get-199@lists.php.net to get a copy of this message | ||
truelight Fri Jan 3 10:48:20 2003 EDT
Modified files:
/phpdoc-nl/reference/filesystem/functions fgets.xml fgetss.xml
file-exists.xml file.xml
filegroup.xml
Log:
Sync with EN
Index: phpdoc-nl/reference/filesystem/functions/fgets.xml diff -u phpdoc-nl/reference/filesystem/functions/fgets.xml:1.1 phpdoc-nl/reference/filesystem/functions/fgets.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/fgets.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/fgets.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.4 Maintainer: truelight Status: ready --> <refentry id="function.fgets"> <refnamediv> <refname>fgets</refname> @@ -55,9 +54,21 @@ </para> <note> <simpara> - De <parameter>length</parameter> parameter is optioneel geworden in PHP 4.2.0 + De <parameter>length</parameter> parameter is optioneel geworden in PHP 4.2.0. + Als het wordt weggelaten., wordt 1024 als lijn lengte genomen. + Vanaf PHP 4.3.0 wordt bij het weglaten van <parameter>length</parameter> + net zolang van de stream gelezen totdat er een 'einde van de regel' + is bereikt. Als de meeste regels in het bestand groter zijn dan 8KB, + dan is het efficienter voor je script om de maximale lijn lengte op te geven. </simpara> </note> + <note> + <simpara> + Deze functie is binair veilig vanaf PHP 4.3.0. Eerdere versies + waren niet binair veilig. + </simpara> + </note> + ¬e.line-endings; <para> Zie ook <function>fread</function>, <function>fopen</function>, <function>popen</function>, <function>fgetc</function>, @@ -86,4 +97,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 +--> Index: phpdoc-nl/reference/filesystem/functions/fgetss.xml diff -u phpdoc-nl/reference/filesystem/functions/fgetss.xml:1.1 phpdoc-nl/reference/filesystem/functions/fgetss.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/fgetss.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/fgetss.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.fgetss"> <refnamediv> <refname>fgetss</refname> @@ -28,6 +27,7 @@ </para> </note> </para> + ¬e.line-endings; <para> Zie ook <function>fgets</function>, <function>fopen</function>, <function>fsockopen</function>, <function>popen</function>, en @@ -55,4 +55,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 +--> Index: phpdoc-nl/reference/filesystem/functions/file-exists.xml diff -u phpdoc-nl/reference/filesystem/functions/file-exists.xml:1.1 phpdoc-nl/reference/filesystem/functions/file-exists.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/file-exists.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/file-exists.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.4 Maintainer: truelight Status: ready --> <refentry id="function.file-exists"> <refnamediv> <refname>file_exists</refname> @@ -25,11 +24,37 @@ Het resultaat van deze functie wordt gecached. Zie <function>clearstatcache</function> voor meer details. </simpara> - <simpara> - Op Windows, gebruik "//computernaam/share/bestandsnaam" of - "\\\\computernaam\\share\\bestandsnaam" om bestanden op een - netwerk share te bekijken. - </simpara> + <note> + <title>Gebruik van gedeelde Windows mappen</title> + <para> + Op windows, gebruik + <filename>//computername/share/filename</filename> of + <filename>\\\\computername\share\filename</filename> om + bestanden op gedeelde netwerkmappen te controleren. + </para> + </note> + <para> + <example> + <title>Testen of een bestand bestaat</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = '/path/to/foo.txt'; + +if (file_exists($filename)) { + print "Het bestand $filename bestaat"; +} else { + print "Het bestand $filename bestaat niet"; +} +?> +]]> + </programlisting> + </example> + </para> + <para> + Zie ook <function>is_readable</function>, <function>is_writable</function>, + <function>is_file</function> en <function>file</function>. + </para> </refsect1> </refentry> @@ -52,4 +77,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 +--> Index: phpdoc-nl/reference/filesystem/functions/file.xml diff -u phpdoc-nl/reference/filesystem/functions/file.xml:1.1 phpdoc-nl/reference/filesystem/functions/file.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/file.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/file.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.6 Maintainer: truelight Status: ready --> <refentry id="function.file"> <refnamediv> <refname>file</refname> @@ -17,7 +16,8 @@ Hetzelfde als <function>readfile</function>, behalve dat <function>file</function> het bestand in een array terug geeft. Elk element van de array komt overeen met een regel uit het bestand, - met het newline teken er nog aan. + met het newline teken er nog aan. Als het faalt, geeft <function>file</function> + &false; terug. </para> <note> <para> @@ -25,24 +25,27 @@ nogsteeds <function>trim</function> gebruiken als je dat niet wilt. </para> </note> + ¬e.line-endings; <para> - Je kan de optionele tweede parameter gebruiken door hem op "1" te zetten, - als je ook in de <link linkend="ini.include-path">include_path</link> wil - zoeken voor het bestand <parameter>filename</parameter>. + Je kan de optionele <parameter>use_include_path</parameter> parameter gebruiken door + hem op "1" te zetten, als je ook in de <link linkend="ini.include-path">include_path</link> + wil zoeken voor het bestand <parameter>filename</parameter>. </para> <para> <informalexample> <programlisting role="php"> <![CDATA[ <?php -// Laad een webpagina in een array en drukt die af -$fcontents = file ('http://www.voorbeeld.com/'); -while (list ($line_num, $line) = each ($fcontents)) { - echo "<b>Regel $line_num:</b>; ", htmlspecialchars ($line), "<br>\n"; -} +// Leest een bestand in een array. In dit voorbeeld gaan we via HTTP om +// de HTML code van een URL te krijgen. +$lines = file ('http://www.voorbeeld.com/'); -// Laad een webpagina in een string -$fcontents = implode ('', file ('http://www.voorbeeld.com/')); +// Loop door onze array, en laat de HTML code zien als HTML code; ook de regel nummers. +foreach ($lines as $line_num => $line) { + echo "Regel #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n"; +} +// Een ander voorbeeld, een webpagina laden in een string. Zie ook file_get_contents(). +$html = implode ('', file ('http://www.voorbeeld.com/')); ?> ]]> </programlisting> @@ -51,16 +54,19 @@ <note> <para> Vanaf PHP 4.3.0 kan je <function>file_get_contents</function> gebruiken - om de inhoud van een bestand als een string te krijgen op - een binair veilige manier. + om de inhoud van een bestand als een string te krijgen. + </para> + <para> + Vanaf PHP 4.3.0 is <function>file</function> binair veilig. </para> </note> ¬e.not-bin-safe; &tip.fopen-wrapper; <para> Zie ook <function>readfile</function>, - <function>fopen</function>, <function>fsockopen</function>, en - <function>popen</function>. + <function>fopen</function>, <function>fsockopen</function>, + <function>popen</function>, <function>file_get_contents</function> + en <function>include</function>. </para> </refsect1> </refentry> @@ -84,4 +90,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 +--> Index: phpdoc-nl/reference/filesystem/functions/filegroup.xml diff -u phpdoc-nl/reference/filesystem/functions/filegroup.xml:1.2 phpdoc-nl/reference/filesystem/functions/filegroup.xml:1.3 --- phpdoc-nl/reference/filesystem/functions/filegroup.xml:1.2 Wed Aug 14 04:41:09 2002 +++ phpdoc-nl/reference/filesystem/functions/filegroup.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.4 Maintainer: truelight Status: ready --> <refentry id="function.filegroup"> <refnamediv> <refname>filegroup</refname> @@ -13,7 +12,7 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Geeft het ID aan van de groep van de eigenaar van het bestand, of &false; + Geeft het groep ID aan van het bestand, of &false; in het geval van een fout. Het ID van de groep wordt gegeven in numeriek formaat. Gebruik <function>posix_getgrgid</function> om de groepnaam op te vragen. </para> @@ -50,4 +49,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 +-->
Index: phpdoc-nl/reference/filesystem/functions/fgets.xml diff -u phpdoc-nl/reference/filesystem/functions/fgets.xml:1.1 phpdoc-nl/reference/filesystem/functions/fgets.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/fgets.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/fgets.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.4 Maintainer: truelight Status: ready --> <refentry id="function.fgets"> <refnamediv> <refname>fgets</refname> @@ -55,9 +54,21 @@ </para> <note> <simpara> - De <parameter>length</parameter> parameter is optioneel geworden in PHP 4.2.0 + De <parameter>length</parameter> parameter is optioneel geworden in PHP 4.2.0. + Als het wordt weggelaten., wordt 1024 als lijn lengte genomen. + Vanaf PHP 4.3.0 wordt bij het weglaten van <parameter>length</parameter> + net zolang van de stream gelezen totdat er een 'einde van de regel' + is bereikt. Als de meeste regels in het bestand groter zijn dan 8KB, + dan is het efficienter voor je script om de maximale lijn lengte op te geven. </simpara> </note> + <note> + <simpara> + Deze functie is binair veilig vanaf PHP 4.3.0. Eerdere versies + waren niet binair veilig. + </simpara> + </note> + ¬e.line-endings; <para> Zie ook <function>fread</function>, <function>fopen</function>, <function>popen</function>, <function>fgetc</function>, @@ -86,4 +97,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 +--> Index: phpdoc-nl/reference/filesystem/functions/fgetss.xml diff -u phpdoc-nl/reference/filesystem/functions/fgetss.xml:1.1 phpdoc-nl/reference/filesystem/functions/fgetss.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/fgetss.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/fgetss.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.fgetss"> <refnamediv> <refname>fgetss</refname> @@ -28,6 +27,7 @@ </para> </note> </para> + ¬e.line-endings; <para> Zie ook <function>fgets</function>, <function>fopen</function>, <function>fsockopen</function>, <function>popen</function>, en @@ -55,4 +55,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 +--> Index: phpdoc-nl/reference/filesystem/functions/file-exists.xml diff -u phpdoc-nl/reference/filesystem/functions/file-exists.xml:1.1 phpdoc-nl/reference/filesystem/functions/file-exists.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/file-exists.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/file-exists.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.4 Maintainer: truelight Status: ready --> <refentry id="function.file-exists"> <refnamediv> <refname>file_exists</refname> @@ -25,11 +24,37 @@ Het resultaat van deze functie wordt gecached. Zie <function>clearstatcache</function> voor meer details. </simpara> - <simpara> - Op Windows, gebruik "//computernaam/share/bestandsnaam" of - "\\\\computernaam\\share\\bestandsnaam" om bestanden op een - netwerk share te bekijken. - </simpara> + <note> + <title>Gebruik van gedeelde Windows mappen</title> + <para> + Op windows, gebruik + <filename>//computername/share/filename</filename> of + <filename>\\\\computername\share\filename</filename> om + bestanden op gedeelde netwerkmappen te controleren. + </para> + </note> + <para> + <example> + <title>Testen of een bestand bestaat</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = '/path/to/foo.txt'; + +if (file_exists($filename)) { + print "Het bestand $filename bestaat"; +} else { + print "Het bestand $filename bestaat niet"; +} +?> +]]> + </programlisting> + </example> + </para> + <para> + Zie ook <function>is_readable</function>, <function>is_writable</function>, + <function>is_file</function> en <function>file</function>. + </para> </refsect1> </refentry> @@ -52,4 +77,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 +--> Index: phpdoc-nl/reference/filesystem/functions/file.xml diff -u phpdoc-nl/reference/filesystem/functions/file.xml:1.1 phpdoc-nl/reference/filesystem/functions/file.xml:1.2 --- phpdoc-nl/reference/filesystem/functions/file.xml:1.1 Tue Aug 13 07:31:17 2002 +++ phpdoc-nl/reference/filesystem/functions/file.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.6 Maintainer: truelight Status: ready --> <refentry id="function.file"> <refnamediv> <refname>file</refname> @@ -17,7 +16,8 @@ Hetzelfde als <function>readfile</function>, behalve dat <function>file</function> het bestand in een array terug geeft. Elk element van de array komt overeen met een regel uit het bestand, - met het newline teken er nog aan. + met het newline teken er nog aan. Als het faalt, geeft <function>file</function> + &false; terug. </para> <note> <para> @@ -25,24 +25,27 @@ nogsteeds <function>trim</function> gebruiken als je dat niet wilt. </para> </note> + ¬e.line-endings; <para> - Je kan de optionele tweede parameter gebruiken door hem op "1" te zetten, - als je ook in de <link linkend="ini.include-path">include_path</link> wil - zoeken voor het bestand <parameter>filename</parameter>. + Je kan de optionele <parameter>use_include_path</parameter> parameter gebruiken door + hem op "1" te zetten, als je ook in de <link linkend="ini.include-path">include_path</link> + wil zoeken voor het bestand <parameter>filename</parameter>. </para> <para> <informalexample> <programlisting role="php"> <![CDATA[ <?php -// Laad een webpagina in een array en drukt die af -$fcontents = file ('http://www.voorbeeld.com/'); -while (list ($line_num, $line) = each ($fcontents)) { - echo "<b>Regel $line_num:</b>; ", htmlspecialchars ($line), "<br>\n"; -} +// Leest een bestand in een array. In dit voorbeeld gaan we via HTTP om +// de HTML code van een URL te krijgen. +$lines = file ('http://www.voorbeeld.com/'); -// Laad een webpagina in een string -$fcontents = implode ('', file ('http://www.voorbeeld.com/')); +// Loop door onze array, en laat de HTML code zien als HTML code; ook de regel nummers. +foreach ($lines as $line_num => $line) { + echo "Regel #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n"; +} +// Een ander voorbeeld, een webpagina laden in een string. Zie ook file_get_contents(). +$html = implode ('', file ('http://www.voorbeeld.com/')); ?> ]]> </programlisting> @@ -51,16 +54,19 @@ <note> <para> Vanaf PHP 4.3.0 kan je <function>file_get_contents</function> gebruiken - om de inhoud van een bestand als een string te krijgen op - een binair veilige manier. + om de inhoud van een bestand als een string te krijgen. + </para> + <para> + Vanaf PHP 4.3.0 is <function>file</function> binair veilig. </para> </note> ¬e.not-bin-safe; &tip.fopen-wrapper; <para> Zie ook <function>readfile</function>, - <function>fopen</function>, <function>fsockopen</function>, en - <function>popen</function>. + <function>fopen</function>, <function>fsockopen</function>, + <function>popen</function>, <function>file_get_contents</function> + en <function>include</function>. </para> </refsect1> </refentry> @@ -84,4 +90,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 +--> Index: phpdoc-nl/reference/filesystem/functions/filegroup.xml diff -u phpdoc-nl/reference/filesystem/functions/filegroup.xml:1.2 phpdoc-nl/reference/filesystem/functions/filegroup.xml:1.3 --- phpdoc-nl/reference/filesystem/functions/filegroup.xml:1.2 Wed Aug 14 04:41:09 2002 +++ phpdoc-nl/reference/filesystem/functions/filegroup.xml Fri Jan 3 10:48:19 2003 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.4 Maintainer: truelight Status: ready --> <refentry id="function.filegroup"> <refnamediv> <refname>filegroup</refname> @@ -13,7 +12,7 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - Geeft het ID aan van de groep van de eigenaar van het bestand, of &false; + Geeft het groep ID aan van het bestand, of &false; in het geval van een fout. Het ID van de groep wordt gegeven in numeriek formaat. Gebruik <function>posix_getgrgid</function> om de groepnaam op te vragen. </para> @@ -50,4 +49,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 +-->