Welcome Guest, Not a member yet? Register   Sign In
Problem calling controller functions
#3

[eluser]Unknown[/eluser]
Mmm…

I've installed a fresh install of CodeIgniter_1.7.2 in a directory called testinstall. Set the config to $config['base_url'] = "http://my_domain.com/testinstall/

Now I'm getting the error "Disallowed Key Characters".

I've hacked an input.php function to find out what character is causing the error
Code:
function _clean_input_keys($str)
{
if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
{
exit('Disallowed Key Characters: '.$str); // Added the variable to display.
}

return $str;
}

and discovered that its a # character.

Adding the # into the regex
Code:
[#a-z0-9:_\/-]
allows me to get past his error but I'd rather not do that.

Now if I go to http://my_domain.com/testinstall all is well.

However if I try to call a function directly I get the Internal Server Error.

Am I calling the function correctly?

http://my_domain.com/testinstall/index.p...ome/callme

Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();    
    }
    
    function index()
    {    
        $this->load->view('welcome_message');
    }
    
    function callme(){
        echo "This function has been called";
    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */


Thanks

Carl


Messages In This Thread
Problem calling controller functions - by El Forum - 09-29-2010, 05:13 AM
Problem calling controller functions - by El Forum - 09-29-2010, 05:27 AM
Problem calling controller functions - by El Forum - 09-29-2010, 06:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB