note 21138 added to function.dirname

From: Date: Tue, 30 Apr 2002 16:09:50 +0000
Subject: note 21138 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-30018@lists.php.net to get a copy of this message
To get the directory of current included file: dirname(__FILE__); For example, if a script called 'database.init.php' which is included from anywhere on the filesystem wants to include the script 'database.class.php', which lays in the same directory, you can use: include_once(dirname(__FILE__) . '/database.class.php'); -- http://www.php.net/manual/en/function.dirname.php http://master.php.net/manage/user-notes.php?action=edit+21138 http://master.php.net/manage/user-notes.php?action=delete+21138 http://master.php.net/manage/user-notes.php?action=reject+21138

« previous php.notes (#30018) next »