{"id":8189,"date":"2020-01-09T10:00:40","date_gmt":"2020-01-09T01:00:40","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=8189"},"modified":"2020-01-09T10:01:08","modified_gmt":"2020-01-09T01:01:08","slug":"cakephp-%e3%83%95%e3%82%a9%e3%83%bc%e3%83%a0%e3%83%98%e3%83%ab%e3%83%91%e3%83%bc1","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/8189","title":{"rendered":"CakePHP \u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc(1)"},"content":{"rendered":"\n<p>\u4eca\u56de\u306fCakePHP\u306e\u300c\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u300d\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u3066\u3001\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u7528\u306eHTML\u3092\u751f\u6210\u3055\u305b\u308b\u65b9\u6cd5\u306e\u8aac\u660e\u3092\u304a\u3053\u306a\u3044\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u672c\u8a18\u4e8b\u306f\u524d\u56de\u306e\u8a18\u4e8b\u300c<a href=\"\/appnews\/archives\/8168\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"CakePHP \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3068\u30d3\u30e5\u30fc\u306e\u9023\u643a (\u65b0\u3057\u3044\u30bf\u30d6\u3067\u958b\u304f)\">CakePHP \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3068\u30d3\u30e5\u30fc\u306e\u9023\u643a<\/a>\u300d\u306e\u7d9a\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<h4>\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u3092\u4f7f\u7528\u3057\u305f\u5b9f\u88c5\u4f8b<\/h4>\n\n\n\n<p>CakePHP\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\uff08\u62e1\u5f35\u5b50\u300cctp\u300d\uff09\u306b\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u3092\u4f7f\u7528\u3057\u305f\u5b9f\u88c5\u3092\u304a\u3053\u306a\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u524d\u56de\u306e\u4f8b\u3068\u540c\u69d8\u306b\u300cSampleController\u300d\u306e\u300cindex\u300d\u30e1\u30bd\u30c3\u30c9\u3068\u9023\u643a\u3059\u308b\u30d3\u30e5\u30fc\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u8a18\u8ff0\u3092\u304a\u3053\u306a\u3063\u3066\u3044\u304d\u307e\u3059\u306e\u3067\u3001\u7de8\u96c6\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>C:\\xampp\\htdocs\\mycakeapp\\src\\Template\\Sample\\index.ctp<\/p>\n\n\n\n<p>CakePHP\u306e\u300c\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u300d\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u30d5\u30a9\u30fc\u30e0\u306e\u5404\u8981\u7d20\u3092\u4ee5\u4e0b\u306e\u30bf\u30b0\u306e\u4e2d\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?=$this->Form->create(null, ['url' => ['controller' => 'sample', 'action' => 'index'], 'type' => 'post'])?>\n\n&lt;!-- \u3053\u306e\u4e2d\u306b\u30d5\u30a9\u30fc\u30e0\u306e\u5404\u8981\u7d20\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 -->\n\n&lt;?=$this->Form->submit('\u9001\u4fe1')?>\n\n&lt;?=$this->Form->end()?><\/code><\/pre>\n\n\n\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306e\u89e3\u8aac\uff1a<\/p>\n\n\n\n<p>1\u884c\u76ee\u306f\u30d5\u30a9\u30fc\u30e0\u306e\u958b\u59cb\u30bf\u30b0\u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059\u3002\u7b2c1\u5f15\u6570\u3067\u306f\u3001\u9023\u643a\u3059\u308bModel(\u4eca\u56de\u306fnull\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059)\u3001\u7b2c2\u5f15\u6570\u3067\u306f\u3001\u9023\u643a\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3068\u30a2\u30af\u30b7\u30e7\u30f3\u30e1\u30bd\u30c3\u30c9\uff08<a rel=\"noreferrer noopener\" aria-label=\"\u524d\u56de\u306e\u4f8b (\u65b0\u3057\u3044\u30bf\u30d6\u3067\u958b\u304f)\" href=\"\/appnews\/archives\/8168\" target=\"_blank\">\u524d\u56de\u306e\u4f8b<\/a>\u3068\u540c\u69d8\u306b\u300cSampleController\u300d\u306e\u300cindex\u300d\u30e1\u30bd\u30c3\u30c9\u3068\u9023\u643a\u3059\u308b\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\uff09\u3001\u304a\u3088\u3073\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u9001\u4fe1\u65b9\u6cd5(&#8216;post&#8217;\uff09\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>5\u884c\u76ee\u306f\u9001\u4fe1(submit)\u30dc\u30bf\u30f3\u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>7\u884c\u76ee\u306f\u30d5\u30a9\u30fc\u30e0\u306e\u7d42\u4e86\u30bf\u30b0\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u306e\u958b\u59cb\u30fb\u7d42\u4e86\u30bf\u30b0\u304a\u3088\u3073Submit\u30dc\u30bf\u30f3\u306e\u5165\u529b\u304c\u3067\u304d\u305f\u3089\u3001\u305d\u306e\u4e2d\u306b\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306e\u5404\u9805\u76ee\u3092\u914d\u7f6e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001\u5b9f\u969b\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3067\u3088\u304f\u4f7f\u7528\u3055\u308c\u308b\u4ee5\u4e0b\u306e5\u7a2e\u985e\u306e\u5165\u529b\u9805\u76ee\u3092\u914d\u7f6e\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u304a\u3082\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p> \u30fb\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9<br> \u30fb\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9<br> \u30fb\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3<br> \u30fb\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9(\u5358\u6570\u9078\u629e)<br> \u30fb\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9(\u8907\u6570\u9078\u629e)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?=$this->Form->create(null, ['url' => ['controller' => 'sample', 'action' => 'index'], 'type' => 'post'])?>\n\n\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9&lt;br>\n&lt;?=$this->Form->text('txt');?>&lt;br>&lt;br>\n\n\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9&lt;br>\n&lt;?=$this->Form->checkbox('chk1', ['id'=>'chk1']);?>\n&lt;?=$this->Form->label('chk1', '\u30c1\u30a7\u30c3\u30af1');?>\n&lt;?=$this->Form->checkbox('chk2', ['id'=>'chk2']);?>\n&lt;?=$this->Form->label('chk2', '\u30c1\u30a7\u30c3\u30af2');?>\n&lt;br>&lt;br>\n\n\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3&lt;br>\n&lt;?=$this->Form->radio('radio',[\n    ['text'=>'\u30e9\u30b8\u30aaA', 'value'=>'radioA', 'checked'=>true],\n    ['text'=>'\u30e9\u30b8\u30aaB', 'value'=>'radioB']\n]);?>&lt;br>&lt;br>\n\n\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9&lt;br>\n&lt;?=$this->Form->select('select', [\n    'sel1'=>'\u30bb\u30ec\u30af\u30c81', 'sel2'=>'\u30bb\u30ec\u30af\u30c82', 'sel3'=>'\u30bb\u30ec\u30af\u30c83'\n]);?>&lt;br>&lt;br>\n\n\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9(\u8907\u6570\u9078\u629e)&lt;br>\n&lt;?=$this->Form->select('selectmulti', [\n    'sel1'=>'\u30bb\u30ec\u30af\u30c81', 'sel2'=>'\u30bb\u30ec\u30af\u30c82', 'sel3'=>'\u30bb\u30ec\u30af\u30c83'\n],[\n    'multiple'=>true,\n    'size'=>3\n]);?>&lt;br>&lt;br>\n\n\n&lt;?=$this->Form->submit('\u9001\u4fe1')?>\n&lt;?=$this->Form->end()?><\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u30d5\u30a9\u30fc\u30e0\u5185\u306e\u5404\u9805\u76ee\u306e\u8a18\u8ff0\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u5b9f\u969b\u306b\u3069\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u306e\u304b\u30d6\u30e9\u30a6\u30b6\u3067\u78ba\u8a8d\u3092\u304a\u3053\u306a\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u78ba\u8a8d\u7528URL:<br> <a href=\"http:\/\/localhost\/caketest\/sample\">http:\/\/localhost\/caketest\/sample<\/a><\/p>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"523\" height=\"553\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2020\/01\/d5b9cc23c6ee3617c12e923ce1ebfc71.png\" alt=\"\" class=\"wp-image-8208\"\/><\/figure>\n\n\n\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8868\u793a\u3055\u305b\u3066HTML\u306e\u78ba\u8a8d\u3092\u304a\u3053\u306a\u3046\u3068CakePHP\u306e\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aHTML\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3055\u305b\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;form method=\"post\" accept-charset=\"utf-8\" action=\"\/caketest\/sample\">&lt;div style=\"display:none;\">&lt;input type=\"hidden\" name=\"_method\" value=\"POST\"\/>&lt;input type=\"hidden\" name=\"_csrfToken\" autocomplete=\"off\" value=\"a5aba20d3112bd73c74294e5e84d87d086ff312f9996822810496eead7d165798e76575feafe7aad0302e7ba9771b0ccc2dd30f30c4754182f33f36803ddbbd1\"\/>&lt;\/div>\n\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9&lt;br>\n&lt;input type=\"text\" name=\"txt\"\/>&lt;br>&lt;br>\n\n\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9&lt;br>\n&lt;input type=\"hidden\" name=\"chk1\" value=\"0\"\/>&lt;input type=\"checkbox\" name=\"chk1\" value=\"1\" id=\"chk1\">&lt;label for=\"chk1\">\u30c1\u30a7\u30c3\u30af1&lt;\/label>&lt;input type=\"hidden\" name=\"chk2\" value=\"0\"\/>&lt;input type=\"checkbox\" name=\"chk2\" value=\"1\" id=\"chk2\">&lt;label for=\"chk2\">\u30c1\u30a7\u30c3\u30af2&lt;\/label>&lt;br>&lt;br>\n\n\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3&lt;br>\n&lt;input type=\"hidden\" name=\"radio\" value=\"\"\/>&lt;label for=\"radio-radioa\">&lt;input type=\"radio\" name=\"radio\" value=\"radioA\" checked=\"checked\" id=\"radio-radioa\">\u30e9\u30b8\u30aaA&lt;\/label>&lt;label for=\"radio-radiob\">&lt;input type=\"radio\" name=\"radio\" value=\"radioB\" id=\"radio-radiob\">\u30e9\u30b8\u30aaB&lt;\/label>&lt;br>&lt;br>\n\n\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9&lt;br>\n&lt;select name=\"select\">&lt;option value=\"sel1\">\u30bb\u30ec\u30af\u30c81&lt;\/option>&lt;option value=\"sel2\">\u30bb\u30ec\u30af\u30c82&lt;\/option>&lt;option value=\"sel3\">\u30bb\u30ec\u30af\u30c83&lt;\/option>&lt;\/select>&lt;br>&lt;br>\n\n\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9(\u8907\u6570\u9078\u629e)&lt;br>\n&lt;input type=\"hidden\" name=\"selectmulti\" value=\"\"\/>&lt;select name=\"selectmulti[]\" multiple=\"multiple\" size=\"3\">&lt;option value=\"sel1\">\u30bb\u30ec\u30af\u30c81&lt;\/option>&lt;option value=\"sel2\">\u30bb\u30ec\u30af\u30c82&lt;\/option>&lt;option value=\"sel3\">\u30bb\u30ec\u30af\u30c83&lt;\/option>&lt;\/select>&lt;br>&lt;br>\n\n\n&lt;div class=\"submit\">&lt;input type=\"submit\" value=\"\u9001\u4fe1\"\/>&lt;\/div>&lt;\/form>\n<\/code><\/pre>\n\n\n\n<p>\u6b21\u56de\u306f\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30d5\u30a9\u30fc\u30e0\u3067\u5165\u529b\u3057\u305f\u5024\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u5074\u3067\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6728\u66dc\u65e5\u62c5\u5f53:nishida<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/8189\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/8189\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"CakePHP \u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc(1)\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/8189\" data-text=\"CakePHP \u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc(1)\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/8189\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/8189\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306fCakePHP\u306e\u300c\u30d5\u30a9\u30fc\u30e0\u30d8\u30eb\u30d1\u30fc\u300d\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u3066\u3001\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u7528\u306eHTML\u3092\u751f\u6210\u3055\u305b\u308b\u65b9\u6cd5\u306e\u8aac\u660e\u3092\u304a\u3053\u306a\u3044\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/8189"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=8189"}],"version-history":[{"count":20,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/8189\/revisions"}],"predecessor-version":[{"id":8216,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/8189\/revisions\/8216"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=8189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=8189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=8189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}