Welcome Guest, Not a member yet? Register   Sign In
New to CI - Having global variables available to every controller?
#4

[eluser]Rolly1971[/eluser]
to answer the last question, when you call the Start controller the function: Start() automagically gets called.

As for the index function, CI automagically looks for and loads this function if no other function is being looked for in the uri. eg:

example.com/index.php/start

loads: the start controller and calls the index() function.

if you go: example.com/index.php/start/hello

the index() function does not get called automatically. However the Start() still gets automatically called. And because you have: hello as your second uri segment, CI will look for a function called: hello() and run it if it exists.


Messages In This Thread
New to CI - Having global variables available to every controller? - by El Forum - 10-05-2010, 09:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB