php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36556 include_once and set_include_path
Submitted: 2006-02-28 11:38 UTC Modified: 2006-02-28 14:20 UTC
From: reto at buxaprojects dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.1.2 OS: Windows XP
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: reto at buxaprojects dot com
New email:
PHP Version: OS:

 

 [2006-02-28 11:38 UTC] reto at buxaprojects dot com
Description:
------------
include_once() and require_once doesn't work properly by using set_include_path().

Reproduce code:
---------------
<?php
require_once("dir/file.php");
set_include_path("../another_dir/");
require_once("dir/file.php");
?>

Expected result:
----------------
include the files in 2 different directories.

Actual result:
--------------
includes only the second file and NOT both.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-28 11:53 UTC] tony2001@php.net
"dir/file.php" is still the same file even if you add a directory to include_path.
No bug here.
 [2006-02-28 14:20 UTC] reto at buxaprojects dot com
But why does it include the second file, and not the first one?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 28 20:00:02 2025 UTC