Hello, I successfully used the include function on http://mrconcreteblockhouse.com/index.php which has 2 include files: <?php include("top.php"); ?> Code (markup): and <?php include("bottom.php"); ?> Code (markup): The index works just fine. However when I try to put the same code in http://mrconcreteblockhouse.com/f/found ... b.html.php it doesn't work. I then tried placing copies of top.php and bottom.php in the same /f/ directory, but still doesn't show the top or bottom. Then I tried defining the path to the directory: <?php define('PATH', '/www/mrconcreteblockhouse/httpdocs/'); ?> Code (markup): <?php include(PATH . "top.php"); ?> Code (markup): Still doesn't work. Any ideas?
make sure that the path is correct and the file is in PHP format.. if your top.php is in root and you want to include it from a file inside a different folder, use include "../top.php"; instead.
Yes, I'm also looking for the html equivelant/solution. So I tried the "../" which looks like this on /f/foundation-hub.html/ <?php include ("../top.php"); ?> Code (markup): No go. Maybe I didn't type it correctly?
can you give a screen shot of your directory tree? it's different depends how you arrange your file in the directory...
That did the trick. Once I renamed the foundation-hub.html to foundation-hub.php, everything works with copies of top.php and bottom.php in said subdirectory. Thanks to all for your input. Problem solved. =)