note 38266 added to function.require
| From: | php-general at lists dot php dot net | Date: | Sun, 14 Dec 2003 16:41:23 +0000 |
| Subject: | note 38266 added to function.require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61940@lists.php.net to get a copy of this message | ||
When you really want to include another file in the same directory, you must write like follows:
<?php
require dirname(__FILE__) . '/foobar.php';
?>
<?php require 'foobar.php'; ?> does NOT means including foobar.php in the same
directory like the other languages. It means looking for 'foobar.php' through
include_path. Generally include_path contains '.', though, that '.' is just a
current *execusion* directory. Bear in mind!
----
Manual Page -- http://www.php.net/manual/en/function.require.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38266
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38266&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38266&report=yes
Search -- http://master.php.net/manage/user-notes.php