That is not about getting file name from the url of current page. I have a php file like that.
<?php
$fileurl = 'http://example.com/filepath/filepath2/myfile.doc';
?>
here, The page's url doesn't matter. I need to extract filename from $fileurl
. All I need to get myfile.doc from $fileurl
to
Something like echo $filename;
Output: myfile.doc