facebook twitter hatena line email

「Php/codeigniter/コマンド」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
行3: 行3:
 
<pre>
 
<pre>
 
class Citest extends MY_Controller {
 
class Citest extends MY_Controller {
public function index()
+
    public function index()
{
+
    {
echo 'citest/index';
+
        echo 'citest/index';
}
+
    }
 
}
 
}
 
</pre>
 
</pre>
行19: 行19:
 
     public function test()
 
     public function test()
 
     {
 
     {
echo 'batch/test';
+
        echo 'batch/test';
 
     }
 
     }
 
}
 
}
 
</pre>
 
</pre>
 
参考:https://qiita.com/horikeso/items/69b5329d87b30aa35d68
 
参考:https://qiita.com/horikeso/items/69b5329d87b30aa35d68

2025年4月21日 (月) 04:48時点における版

モジュールなしのとき

env CI_ENV=development php ci3app/index.php citest index

class Citest extends MY_Controller {
    public function index()
    {
        echo 'citest/index';
    }
}

モジュールありのとき

アプリケーションpathがapplication_project_path1だったとき、Batchクラスのtestメソッドにアクセスする

CI_ENV=production php application_project_path1/index.php batch test
class Batch extends MY_Controller
{
    public function test()
    {
        echo 'batch/test';
    }
}

参考:https://qiita.com/horikeso/items/69b5329d87b30aa35d68