Welcome Guest, Not a member yet? Register   Sign In
opening error
#1

[eluser]Bharani[/eluser]
http://snrt1/CodeIgniter/index.php/image...ller/index


in a image_Gallery_controller file..

i did code every correctly..but form not display..it showing this error



404 Page Not Found

The page you requested was not found.
#2

[eluser]Derek Allard[/eluser]
Please post your image_gallery_controller code.
#3

[eluser]Bharani[/eluser]
Code:
<?php
class image_gallery_controller extends Controller {

  function index()
  {
      echo "test";
  
  
    parent::Controller();

    # loaders
    
    $this->load->library('validation');
    $this->load->helper(array('form', 'url', 'array'));
    $this->load->library('image_lib');
    $this->load->database();
    
    
        $config['upload_path'] = './photogallery/images/'; // added
        $config['allowed_types'] = 'gif|jpg|png'; // added
        $config['max_size']    = '100'; // added
        $config['max_width']  = '1024'; // added
        $config['max_height']  = '768'; // added
        $this->image_lib->clear();
        $this->image_lib->initialize($config);
        $this->load->library('upload',$config); // changed
        $this->upload->do_upload();

        $rules['imagename'] = "required";
        //$rules['description'] = "required";
        $this->validation->set_rules($rules);
        
        #Input and textarea field attributes
        $data['imagename'] = array('name' => 'imagename', 'id' => 'imagename','size' => '15');
        //$data['description'] = array('name' => 'description', 'id' => 'description','rows' => 3, 'cols' => 25);
        $data['keyword'] = array('name' => 'keyword', 'id' => 'keyword','rows' => 1, 'cols' => 5);
        $data['userfile'] = array('name' => 'userfile', 'id' => 'image');
        
        //***************combo**********************
        $dbres = $this->Boards->createBoard();
        $ddmenu = array();
        
        foreach($dbres->result_array() as $row)
        {
            $ddmenu[$row['PartPriorityID']] = $row['PartPriority'];
        }
        
        $data['options'] = $ddmenu;
        //********************end of combo***********************
  
        if ($this->validation->run() == FALSE)
        {
            $this->load->view('image_gallery_view', $data);
        }
        else
        {
        
        $imagename = $this->input->post('imagename');
        //$description = $this->input->post('description');
        $comments = $this->input->post('keyword');
        $userfile = $this->input->post('userfile');
       // $this->load->view('formsuccess');
        $this->load->model('image_gallery_model','', TRUE);
        $this->image_gallery_model->add_image($this->upload->data());
        //redirect('/photo_gallery_controller/', 'location');
    
    }
    
        function image_getall(){
        $this->load->model('image_gallery_model');
        $data['query']=$this->image_gallery_model->image_getall();
        $this->load->view('image_gallery_view',$data);
        }
}

}
?>
#4

[eluser]Derek Allard[/eluser]
parent::Controller(); shouldn't be in the index() function. Try capitalizing the "i" in your function name as well, but otherwise this will run in that you shouldn't get a 404 error. I notice that you have a number of requests for help, most starting with basic topics. You might find it helpful to go back and re-read the userguide, and they try more basic things at first. The image functions are pretty advanced if you're having trouble connecting to the controller.

Good luck Bharani
#5

[eluser]Shona[/eluser]
Hi,

Please help,

When i access this page i get an error:

http://localhost/CodeIgniter/index.php/P...d_inv_food


I'm having an error in this:

The Link Appears to be Broken!

Note:
Pdma_member is my controller's folder.

Inventory is my Controller.

and add_inv_food is my view.




Theme © iAndrew 2016 - Forum software by © MyBB