git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@163294 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Aidan Lister 2004-07-14 10:57:08 +00:00
parent 06ef671d0a
commit 5ec3921d47

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
<refentry id="function.fileperms">
<refnamediv>
@ -22,14 +22,17 @@
<programlisting role="php">
<![CDATA[
<?php
// Returns 1777
echo substr(sprintf('%o', fileperms('/tmp')), -4);
// Returns 0644
echo substr(sprintf('%o', fileperms('/etc/passwd')), -4);
?>
]]>
</programlisting>
<para>This would produce the output:</para>
<screen>
<![CDATA[
1777
0644
]]>
</screen>
</example>
<example>
<title>Display full permissions</title>
@ -89,7 +92,7 @@ echo $info;
?>
]]>
</programlisting>
<para>This would prodcude the output:</para>
<para>This would produce the output:</para>
<screen>
<![CDATA[
-r--r--r--