Jump to content

Require function


chrici
 Share

Recommended Posts

Hi all.In the top of my document (above <html>) I have set the variable $fullPath to the following:

$fullPath = 'http://'.$_SERVER['HTTP_HOST'].'/';

So the document is placed in: $fullPath . "myfolder/mydocument.php".What I want to do is to access the include files placed in: $fullPath . "includes/whatever-to-include.php".

require_once($fullPath.'includes/whatever-to-include.php');

But when I try to include (require) the files something goes wrong and it breaks the code.I am using WAMP Server to develop my site. I have an idea that WAMP might be the problem (?).Hope you can help me :)

Link to comment
Share on other sites

Just found the the problem :)In the included file I am including another file. It is the path to the second included file that was problem.Thanks for your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...