Forum Moderators: coopster
I don't totally understand what is happening, a couple of questions
which is located in another catalog
does this mean another site or just somewhere else on your site?
You don't have to move it to the root, you can include from anywhere.
Do you have any idea whether it is the include that is not working or the code being included that is messing things up?
When you view source on the page including the other content is there any of the guestbook content code there?
The guestbook files are located in a subdir from the root of my site. When I include the index.php from the guestbook directory in the index.php on the root, the messages written in the guestbook showes up in the table cell. But it won't load the rest of the files in the guestbook directory (images, css ++).
when you include the file from
/dir/index.php into /index.php
the relative paths will, obviously, not be the same.
I would suggest that in the file you wish to include that all paths are "root relative". All links should start with / and carry on from there. This way, no matter where it lives on the site it knows where to find everything.
The include should look like this
<? include "guestbook/index.php";?>
look at the url's to images and files from there. If they look something like "images/pic.gif" or "../images/pic.gif" then they won't work. Try one and see if it helps. If the images directory is in the root dir then they should look like this.
/images/pic.gif
This will work no matter where the file is moved to in the directory tree.