• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable To call function from URL

#1
[eluser]Blue Sapphire[/eluser]
Hi!
I have following class code :

Code:
<?php

class Main extends Controller {

    function Main()
    {
        parent::Controller();
    }
/****************************************************/    
    function index()
    {
        echo 'index Function';
        //$this->load->view('admin/adwc');
    }
/***************************************************/    
    function myFunc()
    {
        echo 'Another Function';
    }
/**************************************************/    
    
}

?>


I have set route in routes.php as follows:
Code:
$route['admin'] = "admin/main";

I am using following url:

1- http://localhost/personal/com/admin/ [This works fine and shows message]

2- http://localhost/personal/com/admin/myFunc [This url gives me '404 Page Not Found' error].

Can some one guide me where I am wrong and in solving this problem.

Thanks in advance


Messages In This Thread
Unable To call function from URL - by El Forum - 12-13-2008, 10:42 AM
Unable To call function from URL - by El Forum - 12-13-2008, 10:42 PM
Unable To call function from URL - by El Forum - 12-14-2008, 12:34 AM
Unable To call function from URL - by El Forum - 12-14-2008, 02:16 AM
Unable To call function from URL - by El Forum - 12-15-2008, 07:22 AM
Unable To call function from URL - by El Forum - 12-15-2008, 07:42 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.