{"id":18,"date":"2014-07-17T19:58:52","date_gmt":"2014-07-17T10:58:52","guid":{"rendered":"http:\/\/adan.jp.net\/blog\/?p=18"},"modified":"2017-12-08T17:03:44","modified_gmt":"2017-12-08T08:03:44","slug":"cakephp2-5%e3%81%a7%e3%80%81%e8%a4%87%e6%95%b0%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%82%92%e9%81%8b%e7%94%a8%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/adan.jp.net\/blog\/programing\/18","title":{"rendered":"CakePHP2.x\u3067\u3001\u8907\u6570\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u904b\u7528\u3059\u308b"},"content":{"rendered":"<p>\u3042\u308b\u3042\u308b\u30cd\u30bf\u3067\u3059\u304c\u3001\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u3084\u3001\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u308b\u3068\u3001<\/p>\n<ul>\n<li>\u30c9\u30e1\u30a4\u30f3\u3092\u5206\u3051\u3066\u7ba1\u7406\u753b\u9762\u3092\u4f5c\u308a\u305f\u304f\u306a\u3063\u305f<\/li>\n<li>\u4f3c\u305f\u3088\u3046\u306a\u30b5\u30fc\u30d3\u30b9\u3092\u8907\u6570\u4f5c\u308a\u305f\u304f\u306a\u3063\u305f<\/li>\n<\/ul>\n<p>\u306a\u3069\u306a\u3069\u3001CakePHP\u306eModel\u3084\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3001\u30d8\u30eb\u30d1\u30fc\u306a\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u5171\u6709\u3057\u305f\u307e\u307e\u3001\u5225\u30b5\u30a4\u30c8\u3068\u3044\u3046\u5f62\u3067\u30b5\u30fc\u30d3\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u305f\u3044\u30b7\u30fc\u30f3\u306b\u826f\u304f\u906d\u9047\u3059\u308b\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300choge.com\u300d\u3067\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u904b\u7528\u3092\u3057\u3066\u3044\u3066\u3001\u7ba1\u7406\u753b\u9762\u3092\u300cmanage.hoge.com\u300d\u306a\u3069\u3068\u3044\u3063\u305f\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3067\u5206\u3051\u305f\u3044\u5834\u5408\u3002<\/p>\n<p>\u4e0b\u8a18\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210<\/p>\n<pre><code>cake\/app\/\ncake\/lib\/\ncake\/plugins\/\ncake\/public\/ \u2190\u300choge.com\u300d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\ncake\/manage\/ \u2190\u300cmanage.hoge.com\u300d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\n<\/code><\/pre>\n<p>\u3068\u307e\u3041\u3001\u3053\u3093\u306a\u611f\u3058\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u306b\u3057\u3066\u3001<br \/>\n\u30b5\u30a4\u30c8\u5225\u306e\u30ea\u30bd\u30fc\u30b9\u306f\u300cpublic\u300d\u300cmanage\u300d\u306b\u8a18\u8ff0\u3057\u3001<br \/>\n\u5171\u901a\u3067\u4f7f\u3044\u305f\u3044\u30ea\u30bd\u30fc\u30b9\u306f\u300capp\u300d\u306b\u5206\u3051\u7ba1\u7406\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u300choge.com\u300d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u300cpublic\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u306f\u3001<\/p>\n<pre><code>cake\/public\/Config\/\ncake\/public\/Controller\/\ncake\/public\/View\/\ncake\/public\/tmp\/\ncake\/public\/webroot\/\n.htaccess\n<\/code><\/pre>\n<p>\u57fa\u672c\u7684\u306b\u300capp\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u76f4\u4e0b\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4e38\u30b3\u30d4\u3067OK\u3067\u3059\u3002<br \/>\n.htaccess\u3082\u300capp\u300d\u76f4\u4e0b\u306b\u5b58\u5728\u3057\u305f.htaccess\u3092\u30b3\u30d4\u30da\u3067OK\u3002<\/p>\n<p>.htaccess\u306e\u8a2d\u5b9a\u5185\u5bb9\u306f\u3001mod_rewrite\u3092\u4f7f\u3063\u3066\u3001webroot\u3078\u30ea\u30e9\u30a4\u30c8\u3059\u308b\u306e\u307f\u3067\u3059\u3002<\/p>\n<pre>&lt;IfModule mod_rewrite.c&gt;\n    RewriteEngine on\n    RewriteRule    ^$    webroot\/    [L]\n    RewriteRule    (.*) webroot\/$1    [L]\n&lt;\/IfModule&gt;<\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u300choge.com\u300d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u304c\u3001<br \/>\ncake\/public\/webroot\/\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3042\u3068\u306f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306eindex.php\u3067\u3001\u30ea\u30bd\u30fc\u30b9\u306e\u53c2\u7167\u5148\u3092\u5909\u66f4\u3057\u3066\u3042\u3052\u307e\u3059\u3002<br \/>\ncake\/public\/webroot\/index.php<\/p>\n<pre>App::uses('Dispatcher', 'Routing');\nApp::build(array('Model' =&gt; array(ROOT . DS . 'app' . DS . 'Model' . DS)));\nApp::build(array('Console' =&gt; array(ROOT . DS . 'app' . DS . 'Console' . DS)));\nApp::build(array('Vendor' =&gt; array(ROOT . DS . 'app' . DS . 'Vendor' . DS)));\n\n$Dispatcher = new Dispatcher();\n$Dispatcher-&gt;dispatch(\n\tnew CakeRequest(),\n\tnew CakeResponse()\n);<\/pre>\n<p>\u3053\u308c\u3067\u3001\u300choge.com\u300dModel\u3068Console\u3068Vendor\u306e\u30ea\u30bd\u30fc\u30b9\u306f\u3001<br \/>\ncake\/app\/\u76f4\u4e0b\u306e\u3001Model\u3068Console\u3068Vendor\u3067\u7ba1\u7406\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>tmp\/\u3084\u3001Config\u306a\u3069\u306f\u304a\u3053\u306e\u307f\u3067\u266a<\/p>\n<hr><div class='adan_banner'>\n<a href='\/contact'><img src='\/blog\/wp-content\/uploads\/2019\/02\/bosyu_banner.jpeg'><\/a>\n<\/div>  <div class=\"sng-box box26\"><div class=\"box-title\">\u30d7\u30ed\u306b\u805e\u3044\u3066\u307f\u308b<\/div><div class=\"box-content\">\u682a\u5f0f\u4f1a\u793eadan\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30ad\u30e3\u30ea\u30a2\u306b\u771f\u5263\u306b\u5411\u304d\u5408\u3063\u3066\u3044\u307e\u3059\u3002<br>\n<strong class='keiko_blue'>\u4f01\u696d\u306e\u60c5\u5831<\/strong>\u3084<strong class='keiko_blue'>\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u30ad\u30e3\u30ea\u30a2\u30a2\u30c3\u30d7<\/strong>\u306e\u65b9\u6cd5\u3001<strong class='keiko_blue'>\u73fe\u5728\u306e\u5f85\u9047\uff08\u7d66\u6599\u30fb\u5831\u916c\uff09<\/strong>\u3001<strong class='keiko_blue'>\u672a\u7d4c\u9a13\u304b\u3089\u306e\u30b9\u30c6\u30c3\u30d7\u30a2\u30c3\u30d7\u65b9\u6cd5<\/strong>\u306a\u3069\u306e\u3054\u76f8\u8ac7\u3092\u53d7\u3051\u4ed8\u3051\u3066\u3044\u307e\u3059\u3002<br>\n\u304a\u6c17\u8efd\u306b\u304a\u554f\u5408\u305b\u304f\u3060\u3055\u3044\u3002<div class=\"center\"><p>  <a href=\"\/contact\" class=\"btn raised accent-bc strong\">\u304a\u554f\u5408\u305b\u306f\u3053\u3061\u3089<\/a><\/p><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u3042\u308b\u3042\u308b\u30cd\u30bf\u3067\u3059\u304c\u3001\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u3084\u3001\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u308b\u3068\u3001 \u30c9\u30e1\u30a4\u30f3\u3092\u5206\u3051\u3066\u7ba1\u7406\u753b\u9762\u3092\u4f5c\u308a\u305f\u304f\u306a\u3063\u305f \u4f3c\u305f\u3088\u3046\u306a\u30b5\u30fc\u30d3\u30b9\u3092\u8907\u6570\u4f5c\u308a\u305f\u304f\u306a\u3063\u305f \u306a\u3069\u306a\u3069\u3001CakePHP\u306eModel\u3084\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3001\u30d8\u30eb\u30d1 &#8230; <\/p>\n","protected":false},"author":2,"featured_media":1209,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[6],"class_list":{"0":"post-18","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing","8":"tag-cakephp"},"_links":{"self":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":27,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":1683,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions\/1683"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/media\/1209"}],"wp:attachment":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}