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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:18:53+00:00 2026-05-13T14:18:53+00:00

In my Xampp I can do : require_once(‘../myFile.php’); And it works. When I upload

  • 0

In my Xampp I can do :

require_once('../myFile.php');

And it works.

When I upload the file that do the require_once, it doesn’t work.

Here is the error on the server:

Warning: require_once(../myFile.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxx/public_html/yyyy/testinclude.php on line 11

Fatal error: require_once() [function.require]: Failed opening required '../myFile.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxx/public_html/yyyy/testinclude.php on line 11

Any idea?

  • 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-13T14:18:53+00:00Added an answer on May 13, 2026 at 2:18 pm

    One possible reason why its not working is that your file-casing isn’t exactly the same.

    In UNIX, file paths are case-sensitive. This is not the case in WIN. So, if you are including ../myFile.php, your file must be name myFile.php, not myfile.php.


    Also, include are always including files according to the current path. Consider these two files.

    /home/xxx/public_html/first.php
    
    <?php include('dir/second.php'); ?>
    
    /home/xxx/public_html/dir/second.php
    
    <?php include('third.php'); ?>
    

    When running first.php, the second file will include /home/xxx/public_html/third.php.

    When running dir/second.php directly, it will include /home/xxx/public_html/dir/third.php.

    If your include must always be relative to the current file, use the following:

    include(dirname(__FILE__) . '/third.php');
    

    Using the above code fragment, dir/second.php will always include /home/xxx/public_html/dir/third.php regardless of the current directory.

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

Sidebar

Related Questions

It's show following error: Notice: Undefined offset: 1 in C:\xampp\htdocs\evantechbd\secure\content\feature_link_process.php on line 28. Why
I have a form which has action=process.php . Inside that php file there is
We have various php projects developed on windows (xampp) that need to be deployed
I've got a model in CakePHP that doesn't have a table, called Upload. I've
I got this error. Warning: require_once(HTTP/OAuth.php) [function.require-once]: failed to open stream: No such file
I am used to PHP having applications. For example, c:\xampp\htdocs\app1 c:\xampp\htdocs\app2 can be accessed
That's basically it, as far as I can tell. I can include or require_once
When I require any PHP file in my index page I see an error:
I am using XAMPP and was wondering if I can code my site to
I was using xampp to develop locally and then I installed the PHP from

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.