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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:50:10+00:00 2026-06-15T01:50:10+00:00

File tree; boot.php panel/index.php panel/inc/start.php panel/inc/functions.php Process: index.php; requires ‘inc/start.php’ start.php; requires ‘../boot.php’ and

  • 0

File tree;

  • boot.php
  • panel/index.php
  • panel/inc/start.php
  • panel/inc/functions.php

Process:

  • index.php; requires ‘inc/start.php’
  • start.php; requires ‘../boot.php’ and ‘functions.php’
  • (require_once ‘x.php’ used)

Everything works when index.php called. Why i don’t have to use ../../boot.php instead of ../boot.php?
If relative folder is /panel, then require ‘functions.php’ should fail. If it is /panel/inc, require ‘../boot.php’ should fail. But eveything works. How?

Note: I know i should use absolute folder to include files. I am just trying to understand how this example works.

  • 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-15T01:50:11+00:00Added an answer on June 15, 2026 at 1:50 am

    As for the PHP manual:

    http://php.net/manual/en/function.require-once.php

    http://www.php.net/manual/en/function.include.php

    If a path is defined — whether absolute (starting with a drive letter
    or \ on Windows, or / on Unix/Linux systems) or relative to the
    current directory (starting with . or ..)

    When PHP includes / requires a file, it looks for a path relative to the current file position.

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

Sidebar

Related Questions

This is the file tree: /problem/ /problem/index.php index.php category.php somefile.php I have this 2
I have a directory/file tree as follows: index.php /frame/main_class.php /frame/func/function_1.php /frame/func/function_1.php /cfg/config.php //index.php require('frame/main_class.php');
I have this piece of HTML <div id=fileTreeInviati> <ul class=php-file-tree> <li class=pft-directory> <a href=#
I am creating a file tree using PHP & jQuery, but I'm having trouble
If I start copying a huge file tree from one position to another or
I have a category/file tree structure. Both categories and files can have parents, so
I found jquery can generate file tree structure based on existing folders and files
I want to display a file tree similarly to java2s.com 'Create a lazy file
Is there an easy way to compare the file tree of an old git
I have constructed an XML tree structure of an XML file. I am able

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.