#158: include and require with dirname when using relative paths
-------------------------+--------------------------------------------------
 Reporter:  christoph    |       Owner:  [email protected]
     Type:  refactoring  |      Status:  new                          
 Priority:  major        |   Milestone:  2.5 release                  
Component:  core         |     Version:  2.4.4                        
 Keywords:               |  
-------------------------+--------------------------------------------------
 If you imagine a file requiring files that themselves require other files,
 you get a tree of requires. The path is always relative to the root of
 that tree!

 This is the reason why we need absolute paths, enable by

 require_once(dirname(__FILE__) . "/relative_path_to_file");

 for example

 require_once(dirname(__FILE__)."/../http/php/database-pgsql.php");


 In a standard Mapbender installation, not using "dirname" will do no harm,
 but in complex projects with weird folder structure, it will.

-- 
Ticket URL: <http://trac.osgeo.org/mapbender/ticket/158>
Mapbender <http://www.mapbender.org/>
Mapbender
_______________________________________________
Mapbender_dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapbender_dev

Reply via email to