Current template/file path

How do I get the current template/file path. I was always usin Coldfusion where I could use:

<cfset currentPage = GetFileFromPath(GetTemplatePath())> 

to determine the current template/file path. How would I do something similar in PHP?

Thank you all in advance!

I found out that $_SERVER[‘PHP_SELF’] and $_SERVER[‘REQUEST_URI’] are coming very near to what I am looking for. Only not completely. This is the situation: I am working on a Multi-lingual Website, where each language is located in its own directory e.a. en, it, es, nl etc… So when I’m on the english version (en/index.php) of the site and I click the Italian flag, I should be redirected to index.php in the Italian directory (it/index.php) so I tried:


<?php
$current_path = $_SERVER['PHP_SELF'];

echo "<a href='../it$current_path'>IT</a>";
?>

But this way the directory (en) holding index.php is included in the url as well:


sitename.com/it/[B]en[/B]/index.php

Where I actualy need:


sitename.com/it/index.php

What should I use to get just the current filename (index.php) without the directory (en) holding that file?

Thank you in advance!

Edit: Sollution found!!! Instead of using:

$current_path = $_SERVER['PHP_SELF'];

I had to use:

$current_path = basename($_SERVER['PHP_SELF']);