2MB 未満の小さなファイルをアップロードするように codeigniter をセットアップしましたが、正常に動作します。しかし、20MB の大きなファイルをアップロードするのに問題があります >
function stage1()
{
ini_set('upload_max_filesize', '200M');
ini_set('post_max_size', '200M');
ini_set('max_input_time', 3000);
ini_set('max_execution_time', 3000);
$config['upload_path'] = './temp/';
$config['allowed_types'] = 'zip';
$this->load->library('upload', $config);
$this->upload->initialize($config);
if(!$this->upload->do_upload('userfile'))
{
$error = array('error' => $this->upload->display_errors());
$this->load->view('upload_form', $error);
}
else
{
$data = array('upload_data' => $this->upload->data());
//do stuff
}
}
上記のコードの何が問題なのかわかりません。大きなファイルを受け入れ、スクリプトの実行に時間がかかるように php.ini を上書きしましたが、それでも同じエラーが返されます。
You did not select a file to upload.
繰り返しますが、これは小さなファイルでは機能しますが、大きなファイルでは機能しません。
編集: 私のサーバー プロバイダーではファイルのアップロードが制限されていることが判明したため、ファイルを FTP で転送する以外に解決策はありません。