PHP program to print the filename of the current executing PHP script
<?php
//PHP program to print the filename of
//current executing PHP script.
$fileName = $_SERVER['PHP_SELF'];
printf("File Name: %s<br>", $fileName);
?>
Output
File Name: prog.php
