note 90990 deleted from function.include-once by danbrown

From: Date: Wed, 20 May 2009 02:43:37 +0000
Subject: note 90990 deleted from function.include-once by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155770@lists.php.net to get a copy of this message
Note Submitter: jordan.c.paul ---- In response to the comment below about include_once(./example.php) only looking in the current working directory: From the "Include" manual page "If filename begins with ./ or ../, it is looked for only in the current working directory or parent of the current working directory, respectively." However, if you leave the ./ out, then "files for including are first looked for in each include_path entry relative to the current working directory, and then in the directory of current script" in other words, <?php chdir(dirname(__FILE__)); include_once './second.class.php'; ?> could be replaced with <?php include_once 'second.class.php'; ?>

« previous php.notes (#155770) next »