Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3210644
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:35:49+00:00 2026-05-17T14:35:49+00:00

Web page contains php includes: <?php include ‘http://www.example.com/header.txt’; ?> and <?php include ‘http://www.example.com/footer.txt’; ?>

  • 0

Web page contains php includes:

<?php
  include 'http://www.example.com/header.txt';
?> 

and

<?php
  include 'http://www.example.com/footer.txt';
?>

header.txt and footer.txt files with html markup are placed in the root folder of a website.

Everything went ok pretty long, but suddenly the following error messages appeared on webpages in browser right after markup areas, incerted by these php scripts:

Warning: Unknown(includes/main.php): failed to open stream: No such file or directory in >Unknown on line 0

Warning: Unknown(includes/main.php): failed to open stream: No such file or directory in >Unknown on line 0

Warning: (null)(): Failed opening ‘includes/main.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in Unknown on line 0

All markup from txt files is shown by browser correctly. The only problem are these Warning messages. Site is hosted on shared hosting. Nothing was changed in the content of web site folder before these messages appeared.

What is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:35:50+00:00Added an answer on May 17, 2026 at 2:35 pm

    You are using the site url to include the files which is not ideal and depends on php settings eg allow_url_fopen; it won’t work either if you move your site to some different domain. Try using relative paths instead, example:

    include 'includes/header.txt';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This web page http://www.w3schools.com/ASP/prop_sessionid.asp states that a session ID is generated on the ServerSide.
The scenario is this. A web page contains: some DIVs whose visibility can be
I have a web page which contains a select box. When I open a
I have built a web page which contains a Crystal Report built using the
Let's say I want a web page that contains a Flash applet and I'd
I have a master page that contains an ASP.NET server side Menu control (System.Web.UI.WebControls.Menu)
In a web application, I have a page that contains a DIV that has
My web site page contains lot of queries. So it takes lot of time
How can I open a web-page and receive its cookies using PHP? The motivation
My web page sits in a DIV that is 960px wide, I center this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.