t.koyama
qqb25****@trad*****
2013年 3月 27日 (水) 17:59:16 JST
xampp(win32) 1.8.1 に codelgniter 2.0.3-1 をインストールしてTest していま
す。
フォルダ構成は htodocs/ php/ 直下に system/ と webapi / が並列にあり、
webapi / 直下に application/ と index.php が並列に存在します。
index.phpの設定は $system_path = '../system';
$application_folder = './application'; としていま
す。
この状態でユーザーガイド・フォームバリデーションユーザーガイド
<http://codeigniter.jp/user_guide_ja/libraries/form_validation.html>
http://codeigniter.jp/user_guide_ja/libraries/form_validation.html の
「フォームバリデーション(検証)チュートリアル」
記載の入力フォーム myform.php と成功ページ formsuccess.php を
application/views/ フォルダに、
コントローラ form.php を application/controllers/ フォルダの中に保存しまし
た。
ブラウザで <http://localhost/php/webapi/index.php/form/>
http://localhost/php/webapi/index.php/form/ [Enter] とすると、フォームが表示
されます。
ところが、各欄空白のまま送信しても、あるいは、各欄データ記入して送信しても、
URI が
<http://localhost/php/webaspi/index.php/form>
http://localhost/php/webaspi/index.php/form となって、Error 404 が出てしま
います。
( webapi が webaspi となり s が付加されている)。 これは何故でしょう
か?
不具合を解決するにはどのようにすれば良いでしょうか?
因みに、コントローラ wel.php を次のように書き、
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Wel extends CI_Controller {
public function index()
{
$this->load->view('welcome_message');
}
}
これで applications/views/ フォルダにある welcome_message.php を呼び出して
みると、
<http://localhost/php/webapi/index.php/wel/index>
http://localhost/php/webapi/index.php/wel/index となって、「Codinalgnite へ
ようこそ!」の画面は表示されます。
********************************
-------------- next part --------------
HTMLの添付ファイルを保管しました...
Download