Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

uploading picture

$
0
0
I need someone to help me fix this error message:

404 Page Not Found
The page you requested was not found.

After uploading picture and press upload it carries me to this :


views/addslideshows.php


PHP Code:
<td>
                <
div style="margin-left: 80px;">
 
               <div class="row">
                <
br><br>
                
 
                   <div class="col-md-12">
                        <
label for="filename" class="control-label">Select File to Upload</label
 
                   </div>
 
               </div>
                                
                <
div class="form-group">
 
               <div class="row">
 
                   <div class="col-md-12">
 
                       <input type="file" name="filename" size="20" />
 
                       <span class="text-danger"><?php if (isset($error)) { echo $error; } ?></span>
                    </div>
                </div>
                </div>
            
                <div class="form-group">
                    <div class="row">
                        <div class="col-md-12">
                            <input type="submit" class="edit" value="Upload File" class="btn btn-primary"/>
                        </div>
                    </div>
                </div>
                </div>
            <?php /* </div> */ ?>
            </td> 



controllers/cuploadfile.php


PHP Code:
function upload()
 
   {
 
       //set preferences
 
       $config['upload_path'] = 'uploads/';
 
       $config['allowed_types'] = 'jpg|gif';
 
       $config['max_size'   '500000';

 
       //load upload class library
 
       $this->load->library('upload'$config);

 
       if (!$this->upload->do_upload('filename'))
 
       {
 
           
            
// case - failure
 
           $upload_error = array('error' => $this->upload->display_errors());
 
           // $this->load->view('upload_file_view', $upload_error);
            
$this->load->view('addslideshows'$upload_error);
 
       }
 
       else
        
{
 
           
            
// case - success
 
           $upload_data $this->upload->data(); 
 
           $data['success_msg'] = '<div class="alert alert-success text-center">Your file <strong>' $upload_data['file_name'] . '</strong> was successfully uploaded!</div>';
 
           // $this->load->view('upload_file_view', $data);
            
            
$this->Mpages->add_slideshow();
            
            
$this->load->view('addslideshows'$data);
                        
 
       }
        
                
 
   

Can anyone help me figure this thing out?

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>