I am experiencing problems with file paths in my php coding. I have two files in the same directory on my server when i try to link from one to the other i am having to state the directory name that they both reside in: i.e.
direcName/PageLinkedto.php
Surely if they are both in the same directory (direcName) i should only have to use the name of the page to link to.
Two other file which are in seperate directories on the site root can reference one another successfully using a 'file one' link such as :
../fileToLinkTodirectory/fileToLinkTo.php
I would prefer non-canonical conventions throughout the site because full paths are not visible on the address bar but it seems to be errratic with lots of file path errors being displayed in apache.
What is the best method for use when the site goes into full production?? I have muddled through and have them working on my dev server (even though it seems to follow no real logic).
I am dreading having to trouble-shoot these paths if they dont work on the full production server.
Will using the realpath() func solve it or is their something to set up in php.ini??
any ideas ??
with thanx in advance,