How does controller in CodeIgniter work? And what kind of variable can work during controller is called? |
[eluser]greedyman[/eluser]
The first thing I want to ask is how does controller work? Assuming that I have a controller: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); When I access http://localhost:8080/ci/ and http://localhost:8080/ci/television.html and then type http://localhost:8080/ci/test/, I get white screen. If in the first time controller is called (use method in controller), and in the second time, I think controller don't need reload so from group method, I set value for $groupId and in the test method I can get it easy but I can't. Maybe when I call test method, controller is reloaded. The second thing I want to ask, how to pass $groupId through other method? Remember! $groupId doesn't store in controller, I get it from url. |
Welcome Guest, Not a member yet? Register Sign In |