hi all,


I'm new with codeigniter, usually i just write native php code but today i got one request project from someone that need to use codeigniter. but, a problem just occur when i start code with CI (codeigniter).

i am usually use, nginx - php - mysql and i have read CI user_guide properly and i just understand how to use that framework. ok, let's face the problem:

I've create a controller just like this:

PHP Code:
<?php

    
class post extends CI_Controller
    
{
        
        public function 
__construct() {
            
parent::__construct();
            
            
// load site_model
            
$this->load->model('site_model');
        }
        
        public function 
index()
        {
            
$data['posts'] = $this->Site_model->getPosts();            
            
$data['title'] = 'Index Page!';
            
            
// load view
            
$this->load->view('template/header'$data);
            
$this->load->view('post/index'$data);
            
$this->load->view('template/footer');
        }
        
        public function 
view($id)
        {
            
$data['post'] = $this->Site_model->getPosts($id);
            
            
/*
             * show 404 page error if the requested ID
             * is not found in the database.
             */
            
if (empty($data['post']))
            {
                
show_404();
            }
            
            
$data['title'] = $data['post']['post_title'];
            
            
// load the needed view
            
$this->load->view('template/header'$data);
            
$this->load->view('post/view'$data);
            
$this->load->view('template/footer');
        }
    }
i think this is very basic CI code, but when try to access this url: http://localhost/cif/post and the server just show `welcome to nginx` page

fyi, http://localhost/cif is my base project and i was set permission both of dir and files properly