Q:

Write a PHP script to get the current file name

0

Write a PHP script to get the current file name.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
$current_file_name = basename($_SERVER['PHP_SELF']);
echo $current_file_name."\n";
?>

Sample Output:

5c019960-58d0-11e7-8ce0-bdc69d807a6b.php

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now