Code: Select all
require_once(dirname(__FILE__) . '/errors.php');
require_once('./errors.php');Moderator: General Moderators
Code: Select all
require_once(dirname(__FILE__) . '/errors.php');
require_once('./errors.php');First form is guaranteed to ignore include_path and the path specified is always relative to the path of the current file (while the second form may produce some unexpected results when you have a chain of included files and files have the same name on different levels of directory tree, see this comment)jmut wrote:What is the difference if any between these two require statements.
Code: Select all
require_once(dirname(__FILE__) . '/errors.php'); require_once('./errors.php');