lvxuezh 发表于 2012-8-8 16:18:14

上传文件 失败

帮我看一下,为啥最后输出的是空的呢

$config['upload_path'] = './uploads/';
    $config['allowed_types'] = 'csv|CSV';
    $config['max_size'] = '1000000';
    $config['max_width']= '1024';
    $config['max_height']= '768';   
    $this->load->library('upload', $config);
   
    $this->upload->do_upload('upload_file1');
   
    $data = array('upload_data' => $this->upload->data());
   print_r($data['upload_data']['file_name']);exit;


lvxuezh 发表于 2012-8-8 16:31:32

<form method=post action="http://test.sinomedical.net/index.php/upload/upload_product" ENCTYPE="multipart/form-data">
            <table width="507" height="45" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#999999"><table width="507" height="45" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EBEBEB">
                <tr bgcolor="#EAEAEA">
                  <td width="32%" class="login">
                  <div align="center"><strong>上传 <font color="#CC0000">产品</font>
                      数据文件:</strong></div></td>
                  <td width="68%" valign="middle">
                                                <input name="upload_file1" type="file" class="login" id="upload_file1">
                  <input type="submit"class="login" name="submit2" value="上传产品数据">
                  </td>
                </tr>
            </table> </form>
页: [1]
查看完整版本: 上传文件 失败