Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You probably don't want to do that (but might!).</p> <blockquote> <pre><code>- http://localhost/ci_intro/index.php/site/home Becomes - http://localhost/ci_intro/home </code></pre> </blockquote> <p>The way CI works, <code>site</code> is the controller and <code>home</code> is the method or function in the controller you are calling. This allows you to gather respective functionality. </p> <p>e.g. you could have a home controller and an index method like:</p> <pre><code>class Home extends CI_Controller{ public function index(){ echo 'I am the home controller index'; } } </code></pre> <p>which with a url like <code>http://example.com/home</code> (or <code>http://example.com/index.php/home</code> before .htaccess is involved) would show a page with the text "I am the home controller index".</p> <p>Then you can add other functionality to the home controller a'la</p> <pre><code>class Home extends CI_Controller{ public function index(){ // http://example.com/home echo 'I am the home controller index'; } public function user(){ // http://example.com/home/user echo "I am the user method in the home controller"; } } </code></pre> <p>which with a url like <code>http://example.com/home/user</code> would show a page with the text "I am the user method in the home controller".</p> <p>You can also create as many other controllers as you need:</p> <pre><code>class About extends CI_Controller{ public function index(){ // http://example.com/about echo 'I am the about page!'; } } </code></pre> <p><code>http://example.com/about</code> will render a page with the text "I am the about page!"</p> <pre><code>RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] </code></pre> <p>is all the .htaccess you should need to remove index.php form the url. It'd live in <code>/ci_into/.htaccess</code></p> <p>If you really want to use <a href="http://example.com/home" rel="nofollow">http://example.com/home</a> that works with the site controller, you could use <a href="http://ellislab.com/codeigniter/user-guide/general/routing.html" rel="nofollow">routing</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload