codeigniter と Blueimp/jQuery-File-Upload プラグインを使用して、サーバー上のフォルダーにファイルをアップロードすることに成功しました。しかし、action="/upload/success" というフォームに問題があり、いくつかのファイルを正常にアップロードした後に表示される実際の "success.php" ビュー ファイルが表示されます。
「アップロード」コントローラーの関連部分は次のとおりです。
function index() {
$this->load->view('upload/index'); // this is the index.php in the parent directory of the plugin
}
function success() {
require('server/php/index.php'); // this is the index.php inside the server folder of the plugin
// don't need to load a view file, $this->load->view('upload/success"); it's AJAX
}
したがって、基本的に複数のファイルをアップロードすると、出力が HTML ではなくテキストになるという問題があります。
実際に upload/success.php ビュー ファイルを実際の HTML ページにする方法について何か考えはありますか?