I'm having an issue with the include/require path. Since the code style is OOP, the problem comes when subclassing, since the path is relative to the first includer file. For example:
// path: /class/entity/A.class.php
class A { /*definition*/ }
// path: /class/widget/B.class.php
require_once("../model/entity/A.class.php");
class B extends A { /*definition*/ }
// path /ajax/some_request.php
require_once("../class/widget/B.class.php");
//.. some code to execute
The problem is that since the require path is relative to some_request.php
, it won't find A.class.php
because the path would end up being /model/entity/A.class.php
where it should be /class/model/entity/A.class.php