Hello Friends. To get filename from the url use this function.
Call function like this
echo get_filename();
function get_filename(){
$php_self = $_SERVER['PHP_SELF'];
$filename = explode("/", $php_self);
$filename = array_reverse($filename);
return $filename[0];
}
Call function like this
echo get_filename();
Posting Komentar