Welcome Guest, Not a member yet? Register   Sign In
need help....first application
#1

[eluser]Unknown[/eluser]
Hi Guys,

I am very new to CI...Just started yesterday...I downloaded and setup CI and its working fine but now facing a problem

I have the following controller...
class Hello extends Controller {

function Hello()
{
parent::Controller();
}

function index()
{
$this->load->view('hello_world');
}

function world()
{
echo "<h1>Hello World</h1>";
}
}
and I have the default controller in routes.php setup as hello.

when I go to the following link...http://codeigniterapp/ all is fine and it shows me the hello_world.php view via the index function... but when I call this http://codeigniterapp/hello/world/ it doesnt show me any output via the world function.

Dont know why it suppose to do that...shouldn't it ???


Looking forwad to your quick replies...


Ahtasham
#2

[eluser]Vega[/eluser]
It sounds like it could be a problem with your config.php or your .htaccess files. If you want to use clean URLs you need to set the $config['index_page'] variable in config.php to blank string "". You will also need to put a .htaccess file in the root of your ci installation (search the forum for what to put in this).
#3

[eluser]Unknown[/eluser]
Thanks alot...got it now...




Theme © iAndrew 2016 - Forum software by © MyBB