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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:28:00+00:00 2026-06-04T12:28:00+00:00

Update: The index.php file here: /public_html/d/index.php includes: /public_html/d/core/source/class.File1.php This Class.File1.php here has this include

  • 0

Update:

The index.php file here:

/public_html/d/index.php

includes:

/public_html/d/core/source/class.File1.php

This Class.File1.php here has this include written like this:

include 'class.File2.php';

Naturally I put class.File2.php in the same directory as class.File1.php as noted above.

/public_html/d/core/source/class.File2.php

However,

It actually includes this file: ( notice the missing /d/ )

/public_html/core/source/class.File2.php

Not sure why it doesn’t use the file that is in the current directory.

But here are some possibilities.

Entry from a user requesting the page comes in to: ( user types www.host.com/d )

/public_html/d/

This has an include to: ( which works fine, I tested it )

/public_html/d/core/source/class.File1.php 

However the include in that file is where things break as noted above:

include "class.File2.php"

The only thing that makes sense…is that includes are using some sort of internal constant like

ROOT

or

$_SERVER['DOCUMENT_ROOT']

but I still can’t figure out why it would ignore the /d/ but figure out the rest.

  • 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-04T12:28:02+00:00Added an answer on June 4, 2026 at 12:28 pm

    Are you using set_include_path anywhere in your app? Perhaps that could be the cause of your problem. By doing that you are specifying a list of directories where the require, include, fopen(), file(), readfile() and file_get_contents() functions look for files first.

    As an alternative I suggest you define the absolute path to avoid problems.
    Write this on your /public_html/d/core/source/class.File1.php

    // This if you are using PHP >= 5.3
    include(__DIR__ . '/class.File2.php');
    
    // Or this if you dont have the magic constant __DIR__ available
    include(dirname(__FILE__) . '/class.File2.php');
    

    __FILE__ and __DIR__ are magic constants. __FILE__ is a constant that has the absulute path to that specific file. And __DIR__ is the absulte path to the directory where that file is. You can even test them by doing echo __FILE__; or echo __DIR__;

    You can read more about them here http://php.net/manual/en/language.constants.predefined.php

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

Sidebar

Related Questions

here is my index.html file $(document).ready(function() { $.ajax({ url: 'ajax.php', type: 'GET', dataType: json,
The setup: I have a standard .php file (index.php) that contains two includes, one
I'm experiencing a very odd upload problem. Here's the relevant view file: <form action=http://localhost/index.php/temp/upload/
Is this true that Update SQL Query is slow because of Clustered index??????
I'm trying to access CodeIgniter URLs without 'index.php'. Here's the steps I've taken: Checked
I have this ajax_update script that updates file.php every 60 seconds.. Now file.php outputs
I've setup a dbconn.php file in the includes folder outside of the document root.
I am getting the following error after running git svn rebase: 'update-index --refresh: command
Is it possible to configure or modify the NoseGAE plugin to automatically update index.yaml
_stuckVertices is an array of pointers and I would like to update one index

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.