added docs for pathinfo

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@44738 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Beckham 2001-04-02 16:43:28 +00:00
parent 28c698705e
commit 2ad2ba0262

View file

@ -2100,6 +2100,61 @@ mkdir ("/path/to/my/dir", 0700);
</refsect1>
</refentry>
<refentry id="function.pathinfo">
<refnamediv>
<refname>pathinfo</refname>
<refpurpose>Returns information about a file path</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>pathinfo</function></funcdef>
<paramdef>string <parameter>path</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>pathinfo</function> returns an associative array
containing information about <parameter>path</parameter>. The
following array elements are returned:
<parameter>dirname</parameter>, <parameter>basename</parameter>
and <parameter>extension</parameter>.
</para>
<para>
<example>
<title><function>pathinfo</function> Example</title>
<programlisting role="php">
&lt;?php
$path_parts = pathinfo("/www/htdocs/index.html");
echo $path_parts["dirname"] . "\n";
echo $path_parts["basename"] . "\n";
echo $path_parts["extension"] . "\n";
?&gt;
</programlisting>
</example>
</para>
<para>
Would produce:
<informalexample>
<programlisting>
/www/htdocs
index.html
html
</programlisting>
</informalexample>
</para>
<para>
See also <function>dirname</function>,
<function>basename</function> and <function>realpath</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.pclose">
<refnamediv>
<refname>pclose</refname>