[wp-trac] [WordPress Trac] #15853: Plugin Development: Inconsistent file include sources.
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 16 23:23:49 UTC 2010
#15853: Plugin Development: Inconsistent file include sources.
--------------------------+----------------------
Reporter: sterlo | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version: 3.0.3
Severity: normal | Resolution: invalid
Keywords: |
--------------------------+----------------------
Changes (by scribu):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
From the [http://www.php.net/manual/en/function.include.php PHP manual]:
> Files are included based on the file path given or, if none is given,
the include_path specified. If the file isn't found in the include_path,
include() will finally check in the calling script's own directory and the
current working directory before failing. The include() construct will
emit a warning if it cannot find a file; this is different behavior from
require(), which will emit a fatal error.
To make sure you always get the correct path, do this:
`include( dirname(__FILE__) . '/options.php' );`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15853#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list