Get file informations from path using php

by satheeshkumar 2012-07-06 16:30:38

The following code is used to get directory name,base name and file name using php,


$filepath = pathinfo('/www/example/inc/ex.fc.doc');

echo $filepath['dirname'], "n";
echo $filepath['basename'], "n";
echo $filepath['filename'], "n";
?>

Tagged in:

811
like
0
dislike
0
mail
flag

You must LOGIN to add comments