Putting new basename() parameter info in typical <note> format.

Changing basename() example from .php3 to .php as well.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@58575 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2001-09-27 09:28:05 +00:00
parent 5cece6ee12
commit 45d2383a2f

View file

@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
<!-- $Revision: 1.81 $ -->
<!-- $Revision: 1.82 $ -->
<reference id="ref.filesystem">
<title>Filesystem functions</title>
<titleabbrev>Filesystem</titleabbrev>
@ -24,8 +24,7 @@
Given a string containing a path to a file, this function will
return the base name of the file.
If the filename ends in <parameter>suffix</parameter> this will
also be cut off (the <parameter>suffix</parameter> parameter was added
in PHP 4.0.7).
also be cut off.
</para>
<para>
On Windows, both slash (<literal>/</literal>) and backslash
@ -37,12 +36,17 @@
<example>
<title><function>basename</function> example</title>
<programlisting role="php">
$path = "/home/httpd/html/index.php3";
$file = basename ($path); // $file is set to "index.php3"
$file = basename ($path,".php3"); // $file is set to "index"
$path = "/home/httpd/html/index.php";
$file = basename ($path); // $file is set to "index.php"
$file = basename ($path,".php"); // $file is set to "index"
</programlisting>
</example>
</para>
<note>
<para>
The <parameter>suffix</parameter> parameter was added in PHP 4.0.7.
</para>
</note>
<para>
See also: <function>dirname</function>
</para>