ID: 28040
Updated by: [EMAIL PROTECTED]
Reported By: fb at fbeyer dot com
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: *
PHP Version: *
New Comment:
Just use dirname(__FILE__) if you need this information, we will not
add this.
regards,
Derick
Previous Comments:
------------------------------------------------------------------------
[2004-04-17 20:23:00] [EMAIL PROTECTED]
This would also ease writing test scripts.
------------------------------------------------------------------------
[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