Unable to load the requested class: security |
[eluser]s.passiatore[/eluser]
Hi to all, I try to add security class to my autoload array but I give this error: Code: Unable to load the requested class: security This my autoload array: Code: $autoload['libraries'] = array('database', 'security'); Where is the error??? Thanks a lot Stefano
[eluser]s.passiatore[/eluser]
Ok, the CI 2.0.2 the security library is loaded automatically, but if I put this code in my controller I receive an error... Code: $params = $this->security->xss_clean($params); ... and the error: Code: PHP Fatal error: Call to a member function xss_clean() on a non-object
[eluser]cideveloper[/eluser]
Can you show some more code? Need to see more of the controller to help. Specifically the controller class, the method calling this, and the constructor if any. I have loaded the xss_clean and it works fine. also you might want to set Code: $config['log_threshold'] = 4; Code: DEBUG - 2011-06-07 09:00:40 --> XSS Filtering completed Thus I know it is working.
[eluser]goFrendiAsgard[/eluser]
@InsiteFX: I know, this is a very old thread, but what is CI super global object? something like get_instance()?
[eluser]goFrendiAsgard[/eluser]
BTW, I have had a similar problem. And it was solved by visiting this URL: http://stackoverflow.com/questions/62688...odeigniter In CodeIgniter (I don't know since what version) "security" class is a helper, not a library. Therefore, doing this solve the problem: Code: $this->load->helper('security'); |
Welcome Guest, Not a member yet? Register Sign In |