Welcome Guest, Not a member yet? Register   Sign In
New to CI and PHP Question
#2

[eluser]wiredesignz[/eluser]
A class doesnt need a constructor unless you want to do some initialisation when it's created as an object.

Variables outside the class definition are meant to be available to the loading script/class when the class is being include()'d in procedural scripting.

You can still define them in whichever CI class you use to load the library, but the library won't be able to see them without using the &get;_instance() function in your library. (it gives access to the CI super-object)


Messages In This Thread
New to CI and PHP Question - by El Forum - 01-20-2008, 05:01 AM
New to CI and PHP Question - by El Forum - 01-20-2008, 05:11 AM
New to CI and PHP Question - by El Forum - 01-20-2008, 05:28 AM
New to CI and PHP Question - by El Forum - 01-20-2008, 05:34 AM
New to CI and PHP Question - by El Forum - 01-20-2008, 05:59 AM
New to CI and PHP Question - by El Forum - 01-20-2008, 02:00 PM
New to CI and PHP Question - by El Forum - 01-20-2008, 02:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB