0
Well I set up a function in the local.php file:
function Local() {
$path_parts = pathinfo( __FILE__ );
$arquivo = "".$path_parts['dirname']."/".$path_parts['basename'];
return $arquivo;
}
I call the function in the index.php file like this:
include "local.php";
echo Local();
The problem is that it is returning me the path of the function file, and I need it to return me the path of the index.php file..
Someone knows what I’m doing wrong?
However, if I call the function in one file, and call this file inside another with a 'include', the path that returns me is not from the file where the function is being called. I need to identify the file where the function is called, regardless of whether it is placed in a include within another file. You understood my explanation?
– Hugo Borges