|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-17 20:23 UTC] helly@php.net
[2004-04-18 01:01 UTC] derick@php.net
[2010-03-04 18:04 UTC] hellbringer at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 22:00:01 2025 UTC |
Description: ------------ It would be extremely handy to extend the 'magic constant' family by __DIR__ - a constant poining to the directory where the current file is located, ending with a directory separator slash. __DIR__ could be defined in user-land by <?php // Defined as constant - so it won't be usable for // other files... define('__DIR__', dirname(__FILE__) . DIRECTORY_SEPARATOR); // Use __DIR__ require __DIR__ . 'another-file-for-this-library.php'; ?> Many scripts (e.g. SMARTY_DIR) already define variables/constants for this purpose. __DIR__ would be a nice feature to write include_path independent scripts.