| 5:48 pm on Jan 21, 2009 (gmt 0)|
Do you have permissions to the files where they are now? Are you using the correct path? Everything spelled correctly?
There are a bunch of things that could be going wrong. Are you getting any errors from the script you are trying to include these files into?
| 6:54 pm on Jan 21, 2009 (gmt 0)|
Good question. How can i find that out? It does work when the include file is on the same level as the page i'm accessing
| 6:55 pm on Jan 21, 2009 (gmt 0)|
As for the correct path - that might be my issue. I can't figure out how to code it.
| 7:16 pm on Jan 21, 2009 (gmt 0)|
when including a file I use relative paths so if the files are in the same directory lets say / you include the file like this
If you move the header into a directory say /includes/
| 7:46 pm on Jan 21, 2009 (gmt 0)|
What is the main file is about 3 levels DOWN (into) the site?
for example site struture is:
i want to include a file that is on the 'site' level. how do i do that?
| 8:03 pm on Jan 21, 2009 (gmt 0)|
include_once '../../../header.php'; give or take a "../"
.. is up one level . is the current level
| 8:53 pm on Jan 21, 2009 (gmt 0)|
you need to use the full server path to the include file and not the url of the site
then you need to make a file with whatever name you want to use, the example above would require a file name called footer.php, this can be any name you want it to be
| 8:54 pm on Jan 21, 2009 (gmt 0)|
Cool - that helps. But how to i know what the full server path is?
| 9:22 pm on Jan 21, 2009 (gmt 0)|
Got it- dude. i'm an idiot.
thank you all!
| 10:00 pm on Jan 21, 2009 (gmt 0)|
no problem glad you got it sorted ;)
for the sake of anyone else looking to solve the same problem the full server path will be visible on the remote connection of the FTP program what is used to transfer your files