php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5897 include_once returns false on second use
Submitted: 2000-08-01 14:17 UTC Modified: 2000-08-04 12:23 UTC
From: david@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (01/08/2000) OS: Linux 2.2.14
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david@php.net
New email:
PHP Version: OS:

 

 [2000-08-01 14:17 UTC] david@php.net
include_once returns false if you are trying to include an already-included file. This kind of defeats the point of the _once if you are checking for errors in your include.

You will still be able to find out whether you've included a file using get_included_files.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-04 12:23 UTC] stas@php.net
when you use include_once second time, the include is not made (that's the point in "once"), so no error checking in your include can be ever made, because your include code just doesn't run. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 19:01:26 2024 UTC