php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #2700 include/require paths different
Submitted: 1999-11-11 18:15 UTC Modified: 1999-11-25 18:09 UTC
From: pfaffman at relax dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0 Beta 2 OS: Linux
Private report: No CVE-ID: None
 [1999-11-11 18:15 UTC] pfaffman at relax dot com
One incompatibility that I didn't see documented anywhere is that under php3, require (and I suppose include) would first look in the current directory.  In PHP4, you must explicitly put a "." in the include path if you want the current directory checked first.  This broke my main application until I figured out that it was getting the wrong head.php3. . .

Thanks.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-25 18:09 UTC] zeev at cvs dot php dot net
There shouldn't be any change in behavior from PHP 3.0 here,
it's the same code.  In both versions, if you specify no
include_path at all, . (cwd) is assumed.  But if you do
specify an include_path, . is no longer assumed, and you have to explicitly specify it in order for it to work.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 14:00:02 2026 UTC