|
 Bogdan - 2009-08-01 08:48:36
I have some questions (if you don't mind):
As I understand from the code, your class use a globals variable?
Or it's imitation? Nothing specific, just name.
 Bogdan - 2009-08-01 09:18:29 - In reply to message 1 from Bogdan
I have error when processing your script (without change the source code)
/**
* Wrong directory adress when conferment
*@see core/uclassdir.class#recreate
*/
$this->docroot = $_SERVER['DOCUMENT_ROOT'].'/';
It's my $_SERVER['DOCUMENT_ROOT'] = /home/bogdan/workspace/testing/; if you can see this parameter already contains the symbol slash in the end.
So I get the wrong the line of address
$this->docroot = /home/bogdan/workspace/testing//
And I get
UnexpectedValueException: RecursiveDirectoryIterator::__construct(/home/bogdan/workspace/testing//core) [recursivedirectoryiterator.--construct]: failed to open dir: No such file or directory in /home/bogdan/workspace/testing/classesload/core/uclassdir.class on line 46
Perhaps you are right in that approach, but it seems failed to take into account, what main script can be located not in the root catalog.
 Bogdan - 2009-08-01 09:33:17 - In reply to message 2 from Bogdan
Next bug :D : you forgot add file with class "RecursiveDirectoryIterator" to the "core" dir.
 Epsilon Alexey - 2009-08-01 13:22:38 - In reply to message 1 from Bogdan
Thank you for you comments.
Yes, it using $GLOBALS[] as one of possible methods to transfer data from one (included) file to another. Of course, it may be static class with config data in the property and then using it like (for example) uConfig::$conf['core']['somedata']. It will work too.
 Epsilon Alexey - 2009-08-01 13:26:52 - In reply to message 2 from Bogdan
Thank you for reporting this bug.
Actually, $_SERVER['DOCUMENT_ROOT'] is the copy of server's (Apache) config value of DocumentRoot property. So you can set it to "C:/www" or "C:/www/" - both is right. But, you right, uClassDir MUST have tolerance to it.
I will update class file very soon.
 Epsilon Alexey - 2009-08-01 13:32:30 - In reply to message 3 from Bogdan
No, it is not a bug. RecursiveDirectoryIterator is the integrated part of Standard PHP Library and has included in PHP core since PHP5.0. See PHP documentation, please.
|