LoginSignup
6
6

More than 5 years have passed since last update.

FuelPHP tipsメモ

Posted at

action_indexへのリンク

action_indexへのリンクを/index無しに貼りたい
例) hoge.com/moge/index → hoge.com/moge

    echo Html::anchor('/','リンクタイトル');
    // × Html::anchor('','リンクタイトル');

結果
<a href="http://hoge.com/moge">リンクタイトル</a>

ViewをHTMLで書きたい

  • configファイルのコピー(fuel/pachages/parser/config/perser.phpをfuel/app/configへ)
  • extensionsの値を変更('php'=>'View''html'=>'View'へ)
  • \Fuel\Core\Viewを継承したViewクラスの作成(fuel/app/classes/view.php)
  • bootstrap.phpへ記述を追加(Autoloder::add_classes(array('View'=>APPPATH.'classes/view.php'));)

参考:FuelPHP【parser】デフォルトのviewの拡張子が.phpだとみずらいので識別拡張子を変更する

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6