php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13163 Problems with including from within included files
Submitted: 2001-09-05 23:51 UTC Modified: 2001-09-06 11:00 UTC
From: colin at maven dot com dot au Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.0.6 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: colin at maven dot com dot au
New email:
PHP Version: OS:

 

 [2001-09-05 23:51 UTC] colin at maven dot com dot au
There definately seems to be some issues with including or requiring files from within other files that have been included in the same fashion.  Say I have a file called "test.php" in the docroot that includes "file1.php".

The included file contains some class definitions which inherit from classes defined in "file2.php", so at the top of "file1.php" I have:

include_once("file2.php");

This does not seem to work.  It is finding the file correctly, but I receive "Cannot inherit from undefined class" errors.  If I manually include "file2.php" within the "test.php" file along with the "file1.php", it works fine.

Is this meant to happen, or is it a bug or known issue?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-06 11:00 UTC] sniper@php.net
One report per bug please.

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 19:01:35 2019 UTC