The name of a file can be returned to your PHP script using the FILE constant; note there are 2 underscores. Additionally, each line in a PHP file is referred to with the LINE constant.
The FILE will return the full, absolute path to the script; i.e. "/home/jake/php/index.php", NOT the URL. If you're only interested in the filename (without the path information), simply trim it, using the basename() function: basename(FILE).