lingo5 Posted December 15, 2011 Share Posted December 15, 2011 Hi, I need to echo a file name excluding the full path. i.e.: if the path stored in my DB is '../uploads/none.jpg', I need to echo 'none.jpg' only. How can I do that?. Thanks Link to comment https://forums.phpfreaks.com/topic/253237-please-help-echoing-a-file-path/ Share on other sites More sharing options...
ManiacDan Posted December 15, 2011 Share Posted December 15, 2011 basename Link to comment https://forums.phpfreaks.com/topic/253237-please-help-echoing-a-file-path/#findComment-1298146 Share on other sites More sharing options...
lingo5 Posted December 15, 2011 Author Share Posted December 15, 2011 Thanks that fixed it, this is how I've done it: $fullpath = $row_documentos_update_RS['documento_path']; $info = pathinfo($fullpath); $file_name = basename($fullpath,'.'.$info['']); Link to comment https://forums.phpfreaks.com/topic/253237-please-help-echoing-a-file-path/#findComment-1298155 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.