mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
documentation for basename()s optional 2nd argument 'suffix'
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50019 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fb4fc68696
commit
086eb06440
1 changed files with 4 additions and 0 deletions
|
@ -15,11 +15,14 @@
|
|||
<funcprototype>
|
||||
<funcdef>string <function>basename</function></funcdef>
|
||||
<paramdef>string <parameter>path</parameter></paramdef>
|
||||
<paramdef>string <parameter><optional>suffix</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
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 of.
|
||||
</para>
|
||||
<para>
|
||||
On Windows, both slash (<literal>/</literal>) and backslash
|
||||
|
@ -33,6 +36,7 @@
|
|||
<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"
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue