Hey there,
I’ve been working on a new website and I’m trieing some stuff I haven’t done before, but I got a problem. For now I want to print the url of the current page, or the document name, which I can do having the url. I made a little piece of code in an included document. The problem is, the code is giving me the document name of the included doc, not from the page. (for example: index.php). How can I fix the code, so it does give me the right doc name?
Here’s the code:
[code=php]<?php
function printLink($link){
$link = $link;
$document = end(explode(“/”, __FILE__));
print($document);
}
?>
Thanks for thinking with me.
Mrpaplu