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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

History

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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 13 04:01:26 2024 UTC