Log in

View Full Version : PHP include randomly not working



ModernRevolutions
01-11-2011, 06:08 PM
Okay, i use a header, footer, style and index page set up, so every page i make has a PHP include. However, for some stupid reason its not working out of nowhere, I didn't even touch the code at all. it was this:

<?php include("http://www.modernrevolutions.vivid-avenue.net/layout/header2.php"); ?>
And i just changed it to:

<?php include 'http://www.modernrevolutions.vivid-avenue.net/layout/header2.php'; ?>
Which is what i found on a site. However, its still not working what so ever. Here is a link to my page:
http://www.modernrevolutions.vivid-avenue.net

bluewalrus
01-11-2011, 07:05 PM
I think you need to contact your host


URL file-access is disabled in the server configuration...

fileserverdirect
01-11-2011, 08:48 PM
Just use relative links:
include "layout/header2.php";
Be sure your include path is set to your site root!