![]() |
Include/require? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Include/require? (/showthread.php?tid=33103) |
Include/require? - El Forum - 08-16-2010 [eluser]natefons[/eluser] im updating a website that i have, with CI, and running into some problems. the issue i have is, back in the day, i would add all my most commonly used functions in 1 file, and then include it...however, after converting to CI, i cant seem to add "include" or "include_once" i get the following error: A PHP Error was encountered Severity: 8192 Message: Assigning the return value of new by reference is deprecated Filename: PEAR/Config.php Line Number: 80 so my question is, suppose i have functions that i use often, and want them to be added on to my websites, what is the best way to do this? Include/require? - El Forum - 08-16-2010 [eluser]mddd[/eluser] This doensn't directly relate to include or require. The error you get, is because you are writing Code: $some_var =& new Some_object(); In PHP 5 this is deprecated because objects are now given as a reference by default. Change it to Code: $some_var = new Some_object(); If the code is not your own, check for a newer version that targets PHP 5. |