note 104037 added to function.pathinfo
| From: | webmaster | Date: | Wed, 18 May 2011 20:55:05 +0000 |
| Subject: | note 104037 added to function.pathinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179862@lists.php.net to get a copy of this message | ||
ФÑнкÑÐ¸Ñ "pathinfo" оÑказалаÑÑ
ноÑмалÑно показÑваÑÑ
ÑÑÑÑкие имена Ñайлов
напиÑал алÑÑеÑнаÑивÑ
ÑÑнкÑии.
5000 вÑзовов за 0.3863 Ñ. конеÑно не
Ñак бÑÑÑÑо как pathinfo 0.0283 Ñ.
<?php
function full_pathinfo ($path_file){
$path_file = strtr($path_file,array('\\'=>'/'));
preg_match("~[^/]+$~",$path_file,$file);
preg_match("~([^/]+)[.$]+(.*)~",$path_file,$file_ext);
preg_match("~(.*)[/$]+~",$path_file,$dirname);
return array('dirname' => $dirname[1],
'basename' => $file[0],
'extension' => (isset($file_ext[2]))?$file_ext[2]:false,
'filename' => (isset($file_ext[1]))?$file_ext[1]:$file[0]);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 91.198.83.114
----
Manual Page -- http://www.php.net/manual/en/function.pathinfo.php
Edit -- https://master.php.net/note/edit/104037
Del: integrated -- https://master.php.net/note/delete/104037/integrated
Del: useless -- https://master.php.net/note/delete/104037/useless
Del: bad code -- https://master.php.net/note/delete/104037/bad+code
Del: spam -- https://master.php.net/note/delete/104037/spam
Del: non-english -- https://master.php.net/note/delete/104037/non-english
Del: in docs -- https://master.php.net/note/delete/104037/in+docs
Del: other reasons-- https://master.php.net/note/delete/104037
Reject -- https://master.php.net/note/reject/104037
Search -- https://master.php.net/manage/user-notes.php