Welcome Guest, Not a member yet? Register   Sign In
Include/require?
#1

[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?
#2

[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();
This is used in PHP 4 to get a reference to the object instead of a new 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();
and the error goes away.

If the code is not your own, check for a newer version that targets PHP 5.




Theme © iAndrew 2016 - Forum software by © MyBB