Intel XDK プロジェクトで codeigniter を使用してバックエンド データを処理しようとしています。
私はindex.htmlに次のフォームを持っています:
<form method="POST" class='ajax'>
<input type="text" name="user" />
<input type="password" name="password" />
<input type="submit" value="send" />
</form>
js 関数を使用してコントローラーにアクセスしようとすると、ファイルが見つからないというステータスが表示されます。
$('form.ajax').on('submit', function(){
var that = $(this),
url = "../../controllers/welcome.php";
method = that.attr("method"),
data = {};
that.find("[name]").each(function(index, value){
var that = $(this),
name= that.attr("name");
value = that.val();
data[name] = value;
});
$.ajax({
url:url,
type:method,
data:data,
success: function(response){
console.log(response);
}
});
});
URLパスはファイルにつながりますが、それでもステータス404を表示します: localhost:58889/http-services/emulator-webserver/ripple/userapp//C/xampp/htdocs/my_project_folder/application/controllers/welcome.php
Web サイトのように、htaccess ファイルと config ファイルに何かを設定する必要がありますか?
もう1つ、私のXDKプロジェクトはアプリケーション内のビューフォルダーにあります
前もって感謝します