ID: 28040
Updated by: [EMAIL PROTECTED]
Reported By: fb at fbeyer dot com
Status: Open
Bug Type: Feature/Change Request
-Operating System: Any
+Operating System: *
-PHP Version: Irrelevant
+PHP Version: *
New Comment:
This would also ease writing test scripts.
Previous Comments:
------------------------------------------------------------------------
[2004-04-17 19:50:45] fb at fbeyer dot com
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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28040&edit=1