cvs: phpdoc-de /reference/filesystem/functions chown.xml fflush.xml fgetss.xml filegroup.xml

From: Date: Sat, 18 Oct 2008 13:46:36 +0000
Subject: cvs: phpdoc-de /reference/filesystem/functions chown.xml fflush.xml fgetss.xml filegroup.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-2840@lists.php.net to get a copy of this message
hholzgra Sat Oct 18 13:46:36 2008 UTC Modified files: /phpdoc-de/reference/filesystem/functions chown.xml fflush.xml fgetss.xml filegroup.xml Log: translation updates http://cvs.php.net/viewvc.cgi/phpdoc-de/reference/filesystem/functions/chown.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc-de/reference/filesystem/functions/chown.xml diff -u phpdoc-de/reference/filesystem/functions/chown.xml:1.11 phpdoc-de/reference/filesystem/functions/chown.xml:1.12 --- phpdoc-de/reference/filesystem/functions/chown.xml:1.11 Sat Aug 9 12:40:39 2008 +++ phpdoc-de/reference/filesystem/functions/chown.xml Sat Oct 18 13:46:35 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.11 $ --> -<!-- EN-Revision: 1.10 Maintainer: hholzgra Status: ready --> +<!-- $Revision: 1.12 $ --> +<!-- EN-Revision: 1.11 Maintainer: hholzgra Status: ready --> <refentry xml:id="function.chown" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>chown</refname> @@ -58,6 +58,55 @@ &note.sm.uidcheck; </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Simple <function>chown</function> usage</title> + <programlisting role="php"> +<![CDATA[ +<?php + +// File name and username to use +$file_name= "foo.php"; +$path = "/home/sites/php.net/public_html/sandbox" . $file_name ; +$user_name = "root"; + +// Set the user +chown($path, $user_name); + +// Check the result +$stat = stat($path); +print_r(posix_getpwuid($stat['uid'])); + +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +array(7) { + ["name"]=> + string(13) "php.net" + ["passwd"]=> + string(1) "x" + ["uid"]=> + int(148864) + ["gid"]=> + int(148910) + ["gecos"]=> + string(13) "php.net" + ["dir"]=> + string(25) "/home/sites/php.net" + ["shell"]=> + string(13) "/sbin/nologin" +} +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-de/reference/filesystem/functions/fflush.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc-de/reference/filesystem/functions/fflush.xml diff -u phpdoc-de/reference/filesystem/functions/fflush.xml:1.9 phpdoc-de/reference/filesystem/functions/fflush.xml:1.10 --- phpdoc-de/reference/filesystem/functions/fflush.xml:1.9 Sat Aug 9 11:30:44 2008 +++ phpdoc-de/reference/filesystem/functions/fflush.xml Sat Oct 18 13:46:35 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.9 $ --> -<!-- EN-Revision: 1.9 Maintainer: hholzgra Status: ready --> +<!-- $Revision: 1.10 $ --> +<!-- EN-Revision: 1.10 Maintainer: hholzgra Status: ready --> <refentry xml:id="function.fflush" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>fflush</refname> @@ -41,6 +41,39 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>File write example using <function>fflush</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'bar.txt'; + +$file = fopen($filename, 'r+'); +rewind($file); +fwrite($file, 'Foo'); +fflush($file); +ftruncate($file, ftell($file)); +fclose($file); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>clearstatcache</function></member> + <member><function>fwrite</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc-de/reference/filesystem/functions/fgetss.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc-de/reference/filesystem/functions/fgetss.xml diff -u phpdoc-de/reference/filesystem/functions/fgetss.xml:1.10 phpdoc-de/reference/filesystem/functions/fgetss.xml:1.11 --- phpdoc-de/reference/filesystem/functions/fgetss.xml:1.10 Sat Aug 9 11:30:44 2008 +++ phpdoc-de/reference/filesystem/functions/fgetss.xml Sat Oct 18 13:46:35 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.10 $ --> -<!-- EN-Revision: 1.9 Maintainer: hholzgra Status: ready --> +<!-- $Revision: 1.11 $ --> +<!-- EN-Revision: 1.11 Maintainer: hholzgra Status: ready --> <refentry xml:id="function.fgetss" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>fgetss</refname> @@ -98,6 +98,44 @@ </para> </refsect1> + <refsect1 role="examples"> + <para> + <example> + <title>Reading a PHP file line-by-line</title> + <programlisting role="php"> +<![CDATA[ +<?php +$str = <<<EOD +<html><body> + <p>Welcome! Today is the <?php echo(date('jS')); ?> of <?= date('F'); ?>.</p> +</body></html> +Text outside of the HTML block. +EOD; +file_put_contents('sample.php', $str); + +$handle = @fopen("sample.php", "r"); +if ($handle) { + while (!feof($handle)) { + $buffer = fgetss($handle, 4096); + echo $buffer; + } + fclose($handle); +} +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Welcome! Today is the of . + +Text outside of the HTML block. +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; &note.line-endings; http://cvs.php.net/viewvc.cgi/phpdoc-de/reference/filesystem/functions/filegroup.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc-de/reference/filesystem/functions/filegroup.xml diff -u phpdoc-de/reference/filesystem/functions/filegroup.xml:1.8 phpdoc-de/reference/filesystem/functions/filegroup.xml:1.9 --- phpdoc-de/reference/filesystem/functions/filegroup.xml:1.8 Sat Aug 9 11:30:44 2008 +++ phpdoc-de/reference/filesystem/functions/filegroup.xml Sat Oct 18 13:46:35 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.8 $ --> -<!-- EN-Revision: 1.9 Maintainer: hholzgra Status: ready --> +<!-- $Revision: 1.9 $ --> +<!-- EN-Revision: 1.10 Maintainer: hholzgra Status: ready --> <refentry xml:id="function.filegroup" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>filegroup</refname> @@ -47,6 +47,23 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Finding the group of a file</title> + <programlisting role="php"> +<![CDATA[ +<?php +$filename = 'index.php'; +print_r(posix_getgrgid(filegroup($filename))); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="errors"> &reftitle.errors; <para> @@ -65,6 +82,7 @@ <para> <simplelist> <member><function>fileowner</function></member> + <member><function>posix_getgrgid</function></member> <member><link linkend="ini.safe-mode-gid">safe_mode_gid</link></member> </simplelist> </para>

« previous php.doc.de (#2840) next »