Jump to content

Require function


chrici

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...