Hello Everyone,
I've got an include written inside a directory, such as:
mysite.com/folder/include.php
It works fine within this directory and is pulling the right content.
However, I want to have the include on my home page located outside of this folder and have this code within my home page:
<?php include('http://www.mysite.com/folder/include.php'); ?>
But when the home page tries to pull the include I'm getting all sorts of errors. I've tried making all my files an absolute path instead of just a file name and no luck.
Even with an absolute path, my include file still continues to work within the folder but when I try to pull it outside of the folder, errors, such as:
Warning: __preparetemplate(config.php): failed to open stream: No such file or directory in /home/xxx/public_html/folder/library/file.php on line 145
Warning: __preparetemplate(): Failed opening 'config.php' for inclusion (include_path='/home/xxx/public_html/folder') in /home/xxx/public_html/folder/library/file.php on line 145
Any ideas? I assume this is because my include is in a folder, outside my index page. I tried putting my index file inside this folder and it worked.