Warning: Undefined array key 2 in /home/naoooooo8/naoya-ono.com/public_html/blog/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 15
Warning: Undefined array key 3 in /home/naoooooo8/naoya-ono.com/public_html/blog/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 18
Warning: Undefined array key 4 in /home/naoooooo8/naoya-ono.com/public_html/blog/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 21
Warning: Undefined array key 2 in /home/naoooooo8/naoya-ono.com/public_html/blog/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 27
Warning: Undefined array key 3 in /home/naoooooo8/naoya-ono.com/public_html/blog/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 30
Warning: Undefined array key 4 in /home/naoooooo8/naoya-ono.com/public_html/blog/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 33
始めに
このページは、PHPのフレームワーク「FuelPHP」の学習中の僕がメモとして残しているものです。内容に間違いがあればご連絡いただけると幸いです。
コントローラー側で$_GETや$_POSTの値を取得する方法について解説しています。
$_POSTの取得
$_POSTの値を取得したい場合は、Input::post()メソッドを使います。
引数が空の場合は全てのデータを、引数にname属性を指定した場合は、指定したname属性のデータを取得できます。
GETの場合と同じですね。
$email = Input::post('email');
$_GETの取得
$_GETの値を取得したい場合は、Input::get()メソッドを使います。
引数が空の場合は全てのデータを、引数にname属性を指定した場合は、指定したname属性のデータを取得できます。
$name = Input::get('name');
FuelPHPのおすすめ書籍



