Hello, i'm having trouble with technical issue.
let's say i have a file in url: examlpe.com/folder/index.php in the index.php i have a code: "include 'http://www.example.com/header.php';. in the header.php i have "$PHP_SELF". but instead of extracting the index.php path, it extracts the header.php path.
how can the "included file" can extract the path of "includer file"?
Have you tried using a relative link rather than an absolute link
e.g. include ('./header.php');
but then i need to go to every singel file and change the include code, is there any other way?
Set it in a variable and then pass it on...
i dont understand. set what? where? what do you mean to pas it on?
A variable...
// first script $var = 'I really do exist.';
And then in your other scripts...
// other script echo "Yes, $var";
what does it have to do with my problem? i'm confused 🙂
yardensachs wrote:how can the "included file" can extract the path of "includer file"?
Because, if you set the $var to equal the path of the 'includer file' then you can pass this on to the 'included files'.
Unless your question is more cryptic than that and then my answer is I dunno. 😉