[eluser]codeigniterzzz[/eluser]
I'm using codeigniter 2.1.0. And I can't seem to upload file types of css. Here is the controller:
Code:
public function uploadcssfile()
{
$config['upload_path'] = './stylesheets/stores/'.$memberid.'/';
$config['file_name'] = 'main.css';
$config['allowed_types'] = 'css';
$config['overwrite'] = true;
$this->load->library('upload', $config);
if (! $this->upload->do_upload('filefieldname'))
{
die($this->upload->display_errors());
}
}
here is the html code:
Code:
<form action="<?php echo site_url('uploadcssfile'); ?>" enctype="multipart/form-data" method="post">
<input name="filefieldname" type="file" class="field1"/>
<input type="hidden" name="fx" value="uploadCSSfile"/>
<input type="submit" class="blogSaveBut" value="Upload CSS File">
</form>