Welcome Guest, Not a member yet? Register   Sign In
Help to load the page
#2

[eluser]stuffradio[/eluser]
By default this is how it works.

You have your upload dir, lets pretend you upload it in the root folder.

To access the home page you go

http://localhost

or if it's uploaded in a codeigniter folder

http://localhost/codeigniter/

If you want to go to another page(controller)

You go
http://localhost/codeigniter/login

The file path for the controller would be:
home/user/public_html/codeigniter/system/application/controller/login.php

Here is an example Controller for login:

Code:
<?php

class Login extends Controller
{

  function Login()
  {
    parent::Controller();
    $this->load->helper('form'); // I have it set to load in all controllers, so I don't load things unless I need them
  }

  function index()
  {
    // This is the default method for what happens when you load a controller
    $this->load->view('home'); // This will load the file home.php in the folder called views
  }

  function retrieve()
  {

    $this->load->view('retrieve'); // Loads the file retrieve.php in folder called views
    // You can also go $this->load->view('login/retrieve'); That would call the folder 'login' and get the file called retrieve

  }


}

I hope you get the picture on how it works. In order to use the function 'retrieve' you'd go:
http://localhost/codeigniter/login/retrieve

If you have any other questions just ask!


Messages In This Thread
Help to load the page - by El Forum - 08-03-2008, 11:40 PM
Help to load the page - by El Forum - 08-04-2008, 04:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB