Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get file name from file path in php

<?php
$path_parts = pathinfo('/www/htdocs/inc/lib.inc.php');

echo $path_parts['dirname'], "
";
echo $path_parts['basename'], "
";
echo $path_parts['extension'], "
";
echo $path_parts['filename'], "
"; // since PHP 5.2.0
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #file #path #php
ADD COMMENT
Topic
Name
3+4 =