//この記事は編集中です。
サーバーに入れ込みが完了したら、/ application/config/config.phpに基本設定を修正します。
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
$config['base_url'] = ''; ← ここにベースURLを記載。
例)$config['base_url'] = 'http://localhost/';
次に何か表示させみます。
このCodeIgniterは全てindex.phpにアクセスし、その後でコントローラーで処理します。
application/controllers/内にそれぞれ入れ込みます。
テストとしてHelloクラスを入れてみます。
class Hello extends CI_Controller {
public function __construct()
{
parent::__construct();
// これ以降にコードを書いていく
}
function index()
{
echo 'これはテストです。';
}
}
ここでクラスのコンストラクタが使われますので、
再度確認します。
どのフレームワークでもこのクラスとコンストラクタは使われますでの、内容も確認。