• 0

Full URL in PHP Include


Question

Heya again

Been developing a new project for a bit now and have finaly got my act together to begin the push to make it live. I have made a nice template file which calls various bits of information from various places. All of the includes in the page are done via a PHP Include. This works fine if your linking to a file thats easy to get to such as "header.php" however as soon as you try to use a full url "http://mywebsite.com/header.php" it breaks the include.

Anyone have any idea why this is and possibly know a way to fix this?

Much apreciated

Ludz~

Link to comment
https://www.neowin.net/forum/topic/634519-full-url-in-php-include/
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Status-seeker is semi-correct. You can use URLs in include() statements if url_fopen_wrappers is enabled in the PHP configuration. However, it is a security concern. If the files to be included are located on the same server as the calling script, use the absolute path to the file.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.