0

fine-uploader スクリプトを新しい Code igniter インストールに統合した後、次の問題が発生しました。「if (!$this->input->is_ajax_request())」コマンドを使用すると、IE 9 が false を返します。

class Welcome extends CI_Controller {

public function index()
{
    $this->load->view('upload');
}

public function upload()
{   
    error_reporting(E_ALL | E_STRICT);

    if (!$this->input->is_ajax_request())
    {
        die('No direct script access allowed');
    }

    $this->load->helper("qqFileUploader.class");

    $uploader = new qqFileUploader('uploads');
    // Specify the list of valid extensions, ex. array("jpeg", "xml", "bmp")
    $uploader->allowedExtensions = array();

    // Specify max file size in bytes.
    $uploader->sizeLimit = 900 * 1024 * 1024; // 900 Megabytes

    // Specify the input name set in the javascript.
    $uploader->inputName = 'qqfile';

    $uploader->prefix = 'test_';

    // If you want to use resume feature for uploader, specify the folder to save parts.
    $uploader->chunksFolder = 'chunks';
    $result = $uploader->handleUpload('uploads');
    $result['uploadName'] = $uploader->getUploadName();

    header("Content-Type: text/plain");
    echo json_encode($result);
}

}

なんで?

4

1 に答える 1