mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
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:
parent
28c698705e
commit
2ad2ba0262
1 changed files with 55 additions and 0 deletions
|
@ -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">
|
||||
<?php
|
||||
|
||||
$path_parts = pathinfo("/www/htdocs/index.html");
|
||||
|
||||
echo $path_parts["dirname"] . "\n";
|
||||
echo $path_parts["basename"] . "\n";
|
||||
echo $path_parts["extension"] . "\n";
|
||||
|
||||
?>
|
||||
</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>
|
||||
|
|
Loading…
Reference in a new issue