Thursday, 22 August 2013

require_once format produces different behaviours

require_once format produces different behaviours

I'm trying to find the ideal way to integrate files into others throughout
a directory hierarchy in my project.
I've noticed that the following works in Eclipse PDT:
require_once '/../../services/impl/UserService.php';
require_once ('ui/controller/AbstractController.php');
require_once $_SERVER['DOCUMENT_ROOT'] . '/myproject/daos/impl/UserDAO.php';
$dirName = dirname(__FILE__); require_once $dirName . '/../AsbtractDAO.php';
All of these resolve yet the way they're formulated is completely
different. Any ideas why ?
Also, what are the pros/cons of each ? What standard could I adopt that's
the most robust ?

No comments:

Post a Comment