同一段代码,上传图片正常,但上传mp3文件服务器上没有.....
$config['upload_path'] = './uploads/'.date('Y').'/'.date('m').'/'.date('d').'/'.'mp3/';if(!file_exists($config['upload_path'])){
mkdir($config['upload_path'],0777,true);
}
//$config['file_name']='audio'.date('His').rand(100,999);
$config['allowed_types'] = 'mp3|jpg';
$config['encrypt_name'] = 'TRUE';
$this->upload->initialize($config,true);
$this->upload->do_upload('fileaudio');
$fileurl = $this->upload->data('file_name');
$this->load->library('audioInfo');
$this->upload->display_errors('<p>', '</p>');
print_r($this->upload->data());
上传jpg成功,但上传mp3文件,没有报错,但服务器上没有上传的文件
上传mp3提示:The filetype you are attempting to upload is not allowed. 試著在 config / mimes.php 內修改 mp3 的值
'mp3' => array('audio/mpeg','audio/mpeg3','audio/mpg','audio/x-mpeg','audio/mp3','application/force-download','application/octet-stream'),
页:
[1]