I tried putting:
$path = $SCRIPT_FILENAME
echo "<BR> $path";
in my file but I got no output.
Because the following is the error I get:
Warning: Unable to access ../head.inc in /usr/local/psa/home/vhosts/chaindlk.net/httpdocs/prova/chaindlk.php3 on line 11
Warning: Failed opening '../head.inc' for inclusion (include_path='.:') in /usr/local/psa/home/vhosts/chaindlk.net/httpdocs/prova/chaindlk.php3 on line 11
I assume that I will have to the full path like this:
/usr/local/psa/home/vhosts/chaindlk.net/httpdocs/prova/
but if this is true I have to ask: is there no way to have a relative url instead of an absolute url?
I mean if including an INC file in a subfolder works like this:
<? include('subfolder/head.inc'); ?>
then why would including an INC file in the root folder of a subfolder NOT work when it is like this:
<? include('../head.inc'); ?>
Does this mean that if I switch no another server I will have to go through all the PHP3 files and change the path to all the INC files??? I would like to keep it relative paths so if I switch to another server I have to make as little changes as possible, you know what I mean?