![]() |
Need help with array()
OK, so i have this class:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I am guessing is a mixture of document_root and unsetting the $chosen_lang. There is ambiguity in which one you are unsetting since the class's property is named the same and can be access the same. document_root sometimes doesn't work right, that has been my experience, instead I use dirname(__FILE__) for that.
And using var to set class properties is deprecated, you can use public, private, or protected. you can leave it just like that e.g. $lang=array(); and it will default to public. I am guessing the problem is that it can't include the right file or maybe that file has something that is causing the freezing in this line include( $_SERVER['DOCUMENT_ROOT'].'/lang/'.$this->chosen_lang.'/'.$file.'.php' ); |
Oh, yes yes... i found the bug. Thanks a lot, :P.
The problem was that the included file was like this: PHP Code:
PHP Code:
BTW, i'll take a look at those problems you mentioned... ^^ |
Great that you find the problem, good thing it wasn't the constructing the lang path. I didn't mean to look like big problems, it is just a have a pet peeve with ambiguities in codes
|
| All times are GMT. The time now is 01:02 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0