[eluser]Ram Krishna[/eluser]
i have written a code for uploading the files like images,pdf,doc,docx etc.But i am able to upload only images. my controller code is below..
Code:
<?php
class Quote extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->helper(array('form', 'url'));
}
function index()
{
$this->load->view('request_quote_form');
}
function do_upload()
{
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png|doc|docx|jpeg|pdf|txt|ppt|zip|php';
$config['max_size']='1024*20';
$this->load->library('upload', $config);
$this->upload->do_upload();
$data = $this->upload->data();
$file_name=$data['file_name'];
}
}
?>
.