note 90990 added to function.include-once
| From: | jordan dot c dot paul at osu1 dot php dot net | Date: | Tue, 19 May 2009 23:05:35 +0000 |
| Subject: | note 90990 added to function.include-once | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-155762@lists.php.net to get a copy of this message | ||
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';
?>
----
Server IP: 66.207.199.35
Probable Submitter: 68.179.66.169
----
Manual Page -- http://www.php.net/manual/en/function.include-once.php
Edit -- https://master.php.net/note/edit/90990
Del: integrated -- https://master.php.net/note/delete/90990/integrated
Del: useless -- https://master.php.net/note/delete/90990/useless
Del: bad code -- https://master.php.net/note/delete/90990/bad+code
Del: spam -- https://master.php.net/note/delete/90990/spam
Del: non-english -- https://master.php.net/note/delete/90990/non-english
Del: in docs -- https://master.php.net/note/delete/90990/in+docs
Del: other reasons-- https://master.php.net/note/delete/90990
Reject -- https://master.php.net/note/reject/90990
Search -- https://master.php.net/manage/user-notes.php