|
下面是一部分代码, 出现 The upload path does not appear to be valid.
打印出来的config
Array( [upload_path] => users/1/ [allowed_types] => gif|jpg|png [max_size] => 2048 [file_name] => images_1350657427 [overwrite] => )
代码:
$pre_file=$this->input->post("pre_file");
$config['upload_path'] = $this->input->post("goto_file");
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = My_checkUploadSize()*1024; // maximum file size in kb
$config['file_name'] = $pre_file."_".time();
$config['overwrite'] = FALSE;
$new_max_image_size=$this->input->post("new_max_image_size");
$new_min_image_size=$this->input->post("new_min_image_size");
$filename = "";
$error="";
$logofile=$this->input->post("logofile");
if (isset($_FILES['logofile']) && $_FILES['logofile'])
{
$this->load->library('upload', $config);
if (!$this->upload->do_upload('logofile'))
{
$error=$this->upload->display_errors();
print_r($error);
} else
{
$upload_info = $this->upload->data();
$filename = $upload_info['file_name'];
$imginfo = getimagesize($config['upload_path'].$filename);
$maxsize = $new_max_image_size;
$minsize= $new_min_image_size;
if($minsize>0)
{
......
|
|