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 8316119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:17:14+00:00 2026-06-08T21:17:14+00:00

I am running a website locally. I have one main folder, which contains all

  • 0

I am running a website locally.

I have one main folder, which contains all main coding for normal users, it is a file named main.php.

Inside this main folder I have another folder for the admin, which contains, for example, the file named announcement2.php. However, when I try to include it in the front page (index.php), an error appears, it is like the server cannot read the file inside the admin folder.

The error is:

Warning: include(../admin/announcement2.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\pods\main.php on line 85

Warning: include() [function.include]: Failed opening '../admin/announcement2.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\pods\main.php on line 85

And here is the code to include the file in the admin folder from main.php

<td><?php include '../admin/announcement2.php'; ?></td>
  • 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-06-08T21:17:16+00:00Added an answer on June 8, 2026 at 9:17 pm

    This probably just means either (a) permissions are incorrect (web server can’t read the file), or more likely, (b) the path is incorrect. If you echo $_SERVER['PHP_SELF']; you’ll see the path of the script, which would shed light on what path to actually use. But it’s usually faster to try a few variations …

    include '../admin/announcement2.php';
    include 'admin/announcement2.php';
    include '../../admin/announcement2.php';
    

    … until something works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder running locally that contains a website. It runs on xampp
I have a running website on wordpress which has been hacked, some file were
I am running a website locally, all the traffic is routed through NGinx which
I have two separate websites running locally on my IIS server at work. One
I have a an ASP .Net MVC website which works fine when testing locally.
I have a running website and now i like to use WP for a
I have a website running Joomla! (it's not mine, so I don't know how
I have a website running now. I have to implement some logging routines as
I'm running a website with more than 60 000 registered users. Every week notifications
I have an existing website running on IIS6 that has only static HTML pages.

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.