•Try•
Catch

Extract File Name

PHP Snippet to Extract Filename

Easily and reliably extract the filename from a file path. Requires PHP 5.2.0 or later.

$path_parts = pathinfo($input);
return $path_parts['filename']; // since PHP 5.2.0
 

Comments (0)


Add a Comment





Allowed tags: <b><i><br>Comment:


** No RegEx required **

modmore