$this->load->view() is executing the view() method in current controller |
[eluser]shallway[/eluser]
host php version : 4.4.2 CI version : 1.7.2 Here is my Controller : Code: class Question extends Controller{ I'm using pretty url, so the request to the above controller is like this Quote:http://mydomain.com/question/ask Instead of loading the question-form, I god error "Question doesn't exist' which can only be fired by the view method in current controller. so the $this->load->view statement is actually executing the 'view' method! My uri config for CI is : $config['base_url'] = "http://mydomain.com/"; $config['index_page'] = ""; $config['uri_protocol'] = "AUTO"; not sure it's relevant nor not, tho. Any ideas?
[eluser]shallway[/eluser]
Got the answer from CI documentation, under php 4, 'view' is a reserved word. But still what's weird is that I have another site using the same hosting and same php version and I'm sure there're some controllers having 'view' as a function member, but they're surprisingly working. Any explanation?
[eluser]shallway[/eluser]
hmmm .. as I see, CI doc did mention that 'view' can't be used as a Controller name, so I guess using it as a function name is still ok ? |
Welcome Guest, Not a member yet? Register Sign In |