[wp-trac] [WordPress Trac] #17092: use dirname(__file__).'/file.php' instead of './file' for includes
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 9 13:05:59 UTC 2011
#17092: use dirname(__file__).'/file.php' instead of './file' for includes
-----------------------------------+------------------------------
Reporter: ketwaroo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1.1
Severity: minor | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+------------------------------
Comment (by nacin):
I'm not sure I've ever run into a situation where `./` doesn't work the
same as `dirname( __FILE__ )`. It skips include_path, looking for the file
in the same directory.
We used to have `require( 'admin.php' );` in some situations, thus relying
on the include_path and often the script that started the process. But
that shouldn't be the case here with `./`.
I would like some real-life examples of issues where this fails. I've not
seen a Windows server with a problem with this. Additionally, having
multiple domains run off a single copy of WordPress multisite is pretty
common, and given it's the same set of files, this doesn't really come
into play as far as I can tell.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17092#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list