
|
 |

Generate current page nameIf you want to generate the current webpage's filename, you find it via the basename function and calling the $PHP_SELF environment variable:
echo basename($PHP_SELF);
|
This can be useful if you want a HTML form to post to itself, for example:
echo "<form name='form1' method='post' action='".basename($PHP_SELF)."'>";
|
Comments
Comment by whoop on 2005-08-20
just what i neded to create a dynamiv tabs script to work out which tab was active when the tabs run in a seporate heade include
Comment by sanjay on 2005-09-23
echo basename($PHP_SELF);
echo " |
|
|