I'm using codeigniter Suddenly, for some reason, loading my application / config / config.php twice Started.
I have the following code at the top of the config file, line 5 starts from line 12:
function __autoload ($ class) {$ file = APPPATH ' Library / '$ square EXT; If (strpos ($ class, 'CI_') == 0!) {If (file_exists ($ file) & amp; & amp; is_file ($ file)) {@include_once (... APPPATH 'libraries /' $ class EXT); }}} When I test a page, I get this error:
Fatal error: __autoload () did not redistribute can be (was previously announced C: XAMPP \ htdocs \ ci_centric \ application \ config \ config.php: 5) C: \ XAMPP \ htdocs \ ci_centric \ application \ config \ config.php line If I wrap (! function_exists ( '__ autoload')):
notice: constant FRONTEND_PATH with already defined in the C If {. ..} , I get the following output autoload: \ xampp \ htdocs \ ci_centric \ Vedn \ config \ config.php 390 notices on line: Persistent FRONTEND_WEBPARTS_PATH already defined in the C: \ XAMPP \ htdocs \ ci_centric \ Application \ config \ config.php 391 notices on line: Persistent FRONTEND_MAINPAGES_PATH previously defined C: \ XAMPP \ htdocs \ ci_centric \ application \ config \ config.php 392 notices on line: persistent BACKEND_PATH already defined in the C: \ XAMPP \ htdocs \ ci_centric \ application \ config \ config.php 393 notices on line: persistent BACKEND_WEBPARTS_PATH already C Specified in: \ xampp \ htdocs \ ci_centric \ a pplication \ config \ config.php On Line 394 Notice: Continuous BACKEND_MAINPAGES_PATH As defined in the C: \ XAMPP \ htdocs \ ci_centric \ Application \ config \ config.php 395 notices on line: Persistent BACKEND_MAINPAGES_PATH already defined in the C: \ XAMPP \ htdocs \ Ci_centric \ application \ config \ config.php on line 396 . . Everything worked fine for the day; I have $-> this-> Session-> Flash is very rare with data ('...'); So I got the config double loading problem.
Any help would be appreciated ...
good, not me Find out what types of hacks you use, and why do you do this in the configuration file, where only variables are declared. You should delete that code or better even start with a new copy of CodeIgniter. You do not know that the codeigner wants to load this file twice. Anyway, you should not do such things in any way. If it is really necessary for some weird reasons, you can try moving it to MY_core.php or even index.php file , It is still completely wrong, but better than what you have now.
Comments
Post a Comment