Join Up!
104886 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousparse_ini_filepclosenext
Last updated: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Finnish | German | Spanish

pathinfo

(PHP 4 >= 4.0.3)

pathinfo -- Returns information about a file path

Description

array pathinfo ( string path)

pathinfo() returns an associative array containing information about path. The following array elements are returned: dirname, basename and extension.

Příklad 1. pathinfo() Example

<?php

$path_parts = pathinfo("/www/htdocs/index.html");

echo $path_parts["dirname"] . "\n";
echo $path_parts["basename"] . "\n";
echo $path_parts["extension"] . "\n";

?>

Would produce:

/www/htdocs
index.html
html

Poznámka: For information on retrieving the current path info, read the section on predefined reserved variables.

See also dirname(), basename(), parse_url() and realpath().

User Contributed Notes
pathinfo
add a note about notes
There are no user contributed notes for this page.
previousparse_ini_filepclosenext
Last updated: Sun, 27 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST