Thursday, 12 September 2013

get file name for url php

get file name for url php

I wanted to know how to get the current file name in PHP to be able to
load the same file in a different directory.
index.php
works.php
lang/de/
index.php
works.php
lang/pl/
index.php
works.php
<div id="language">
<a href="../../index.php" class="lang">EN</a>
<a class="lang" href="index.php">DE</a>
<a class="lang" href="../pl/index.php">PL</a>
</div>
The current method is redirecting the lang URL, allways to index.php. I
would love to know how to redirect from works.php to lang/de/works.php
without redirecting to lang/de/index.php
Sorry if i'm getting you confused

No comments:

Post a Comment