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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:13:51+00:00 2026-06-13T04:13:51+00:00

I cannot locate the file even when using multiple ../ to find the file:

  • 0

I cannot locate the file even when using multiple ../ to find the file:

root -> public -> secure -> lock  -> login / "data.php"
                            panel -> data -> list / "list.php"

I want to include data.php with my list.php and tried doing the following to include the data:

include("../../../../lock/login/data.php");
include("../../../lock/login/data.php");
and also
include("../../lock/login/data.php");

However, this doesn’t seem to work, but if I place it beside list.php and do the following, it reads the data just fine:

include("data.php");

What am I doing wrong with my code and what is a better way to execute this?

  • 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-13T04:13:52+00:00Added an answer on June 13, 2026 at 4:13 am

    Learn to use:

    __FILE__; // for your current file path
    dirname(__FILE__) or __DIR__; // for your current file parent folder
    $_SERVER['DOCUMENT_ROOT']; // for your sites inception folder, your pivotal point
    

    This should get you on your way. Then you can:

    include __DIR__.'/../file-REALLY-relative-to-directory-of-edit-file.php';
    include $_SERVER['DOCUMENT_ROOT'].'/absolute-path-reliable-for-your-site.php';
    

    NEVER EVER DO RELATIVE INCLUDES LIKE (current directory can change and break your world):

    include 'an-unreliable-NOT-REALLY-relative-file.php';
    

    Hope it helps!

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

Sidebar

Related Questions

My code cannot locate the .properties file where i have stored login information. I
I am using the Zend Framework and I cannot locate in the documentation the
Cannot dump Stack Overflow XML file into SQL Server 2008. Could you please explain
Cannot find any example on Google.
Cannot bind the CollectionViewSource DocProps is a public property public ObservableCollection<DocProp> DocProps1 DataContext is
I have created a language file in poedit for the use of the PHP
I can not locate the correct method to make the first item in a
Here's the troublesome function. I can not correctly locate the nested UL element: function
Cannot seem to loop through the XElement and build a datatable. My XElement will
Cannot figure out, where to change EOF in PyCharm. My scripts start with :

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.