From: Andreas A. <a.a...@th...> - 2001-06-30 14:33:48
|
Hi, > And then in the top of index.php, put these lines: > import('../../../bullshit'); > exit; I think import() is not meant to handle path/fileinformation directly. What you described is a side effect of import caus dots are translatet to / and this way the import contains a meta info. But this might not be neccessarily a path. (this should be fixed, disallow "/", "\" and .+). The idea of import is a system to simplify including, I think (correct me if I'm wrong): E.g.: import('binarycloud.pear'); instead of: include_once(BC_PATH."/ext/pear/PEAR.php"); include_once(BC_PATH."/ext/pear/cache.php"); include_once(BC_PATH."/ext/pear/whatever.php"); include_once(BC_PATH."/ext/pear/stuff.php"); The import() includes all neccessary files related to pear (or alle neccesary files of pear you need to include by calling import(bc.pear), or all files in the ext/pear/ directory or....). Imagine you have to include all by hand and then some filenames change within pear, you have to edit all your code where you include pear. With import, nothing changes. Ok, you could do it the common way. But with a growing codebase the package thing is more flexible, clear and intuitive, in my opinion. And imagine it's required that individual tasks have to be perfomed by including a specific package. If so you dont have to care about this, just import package and thats it. Andi |