|
我看过mimes.php里面明明有'html' => 'text/html' 而且我用firebug看'Content-Type' 也是'text/html'
PHP复制代码
$config['upload_path'] = './uploads/';
$config['allowed_types'] = '*';
$config['max_size'] = '0';
$this->load->library('upload');
//$field_name = "template_file";
$this->upload->initialize($config);
if($this->upload->do_upload()){
$startnums = $this->input->post('startnums');
$endnums = $this->input->post('endnums');
$uploaded = $this->upload->data();
print_r($uploaded);
}else{
echo $this->upload->display_errors();
$this->load->view('welcome_message');
}
print_r($_FILES);
echo '<br>';
print_r($this->upload->data());
复制代码
最后只能把allowed_types改成'*'才行。。。那就是说allowd_types失效这就不能限制用户了。。。
|
|