blog.knym.net | I'm searching something to change my life.

PHPでパスの文字列からファイル拡張子の値の取得

php; first-line: 0;">
$path = pathinfo('/www/htdocs/index.html');
echo $path['dirname'];//=>/www/htdocs
echo $path['basename'];//=>index.html
echo $path['extension'];//=>html
echo $path['filename'];//=>index


via PHP: pathinfo – Manual

Related Posts

Write a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Essentials

Meta

Pages

Categories