{"id":2868,"date":"2009-04-05T14:00:27","date_gmt":"2009-04-05T14:00:27","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=2868"},"modified":"2009-04-05T14:00:27","modified_gmt":"2009-04-05T14:00:27","slug":"controller%eb%a5%bc-model%ec%95%88%ec%97%90%ec%84%9c-%ec%82%ac%ec%9a%a9%ed%95%98%ea%b8%b0%ed%98%b9%ec%9d%80-%eb%b6%88%eb%9f%ac%ec%98%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=2868","title":{"rendered":"controller\ub97c model\uc548\uc5d0\uc11c \uc0ac\uc6a9\ud558\uae30(\ud639\uc740 \ubd88\ub7ec\uc624\uae30?)"},"content":{"rendered":"<p><SPAN style=\"FONT-SIZE: 12px\" id=writeContents>\uc81c\ubaa9 \ubd99\uc774\uae30\uac00 \uc880 \uc5b4\ub835\ub124\uc694 <BR>CI\ub85c CMS\ub97c \uac1c\ubc1c\ud558\ub2e4\ubcf4\ub2c8 CI\ucf54\uc5b4\uc640 \ud50c\ub7ec\uadf8\uc778, \uc704\uc82f, \ub808\uc774\uc544\uc6c3 \ub4f1\uc744 \ubd84\ub9ac\ud574\uc57c\ud560 \ud544\uc694\uc131\uc774 \uc0dd\uacbc\uc2b5\ub2c8\ub2e4. <BR>\uadf8\ub9ac\uace0 \ud50c\ub7ec\uadf8\uc778\uc758 \ud2b9\uc131\uc0c1 \uc790\uae30 \uc790\uc2e0\ub9cc\uc73c\ub85c\ub3c4 \uc6f9\uc5d0\uc11c \ubcf4\uc77c \uc218 \uc788\uc5b4\uc57c \ud574\uc11c \uc8fc\uc18c\uccb4\uacc4\ub97c CI\uc758 \uc8fc\uc18c\uccb4\uacc4\ub85c \ub3d9\uc77c\ud558\uac8c \uc0ac\uc6a9\ud574\uc57c \ud588\uc2b5\ub2c8\ub2e4.(\ubcc0\uc218 \uc804\ub2ec\ub3c4 \ud3ec\ud568) <BR><BR><br \/>\n<DIV style=\"PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #c9edff; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 10px\">application\/ <BR>plugins\/ <BR>widgets\/ <BR>layouts\/ <BR>system\/<\/DIV><BR>http:\/\/localhost\/plugins\/control\/board\/main&nbsp; &nbsp; &lt;- \uc774\ub807\uac8c \uc8fc\uc18c\ub97c \uc4f0\ub294\ub370 \ud50c\ub7ec\uadf8\uc778\uc911 \uac8c\uc2dc\ud310(board)\uc758 main.tpl.php(\ud15c\ud50c\ub9bf) \ud30c\uc77c\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4. <BR>\uc704 \uc8fc\uc18c\ub294 application\/controllers\/plugins.php \uc5d0 \uc5f0\uacb0\ub418\uc5b4\uc788\uace0 \uadf8 \ub0b4\uc6a9\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. <BR><BR><br \/>\n<DIV style=\"PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #d0ff9d; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 10px\">function control (){ <BR>$this-&gt;load-&gt;model(PLUGPATH.&#8217;\/&#8217;.$this-&gt;uri-&gt;segment(3).&#8217;\/Functions&#8217;); <BR>\/\/ $this-&gt;uri-&gt;segment(3)=&gt; board \ud50c\ub7ec\uadf8\uc778\uc758 Functions.php \ubaa8\ub378\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4. <BR>\/\/ \ud50c\ub7ec\uadf8\uc778 \uaddc\uce59\uc73c\ub85c \ubaa8\ub378\uc740 Functions.php\ub85c \uc815\ud569\ub2c8\ub2e4. <BR>$data=$this-&gt;Functions-&gt;default_control(); \/\/ Functions \ubaa8\ub378\uc758 default_control \ud568\uc218\ub97c \ud638\ucd9c\ud558\ub294\ub370 \uadf8 \uc548\uc5d0 \ucee8\ud2b8\ub864 \ud30c\uc77c\uc774 \ub4e4\uc5b4\uc788\uc2b5\ub2c8\ub2e4. <BR>$this-&gt;load-&gt;parser(PLUGPATH.&#8217;\/&#8217;.$this-&gt;uri-&gt;segment(3).&#8217;\/default\/&#8217;.$this-&gt;uri-&gt;segment(4).&#8217;tpl.php&#8217;, $data); <BR>} <BR><\/DIV><BR>plugins\/board\/Functions.php <BR><br \/>\n<DIV style=\"PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #d0ff9d; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 10px\">function blist (){ <BR>&nbsp; \uac8c\uc2dc\ud310 \ub9ac\uc2a4\ud2b8 \uac00\uc838\uc624\ub294 \ud568\uc218 <BR>&nbsp; return $query-&gt;result_array(); \/\/ result_array()-&gt; CI\uc758 DB\ud568\uc218 <BR>} <BR>function default_control (){&nbsp; &nbsp; <BR>&nbsp; $ll = $this-&gt;blist(&#8216;test&#8217;); \/\/\uac8c\uc2dc\ud310 \ub9ac\uc2a4\ud2b8\ub97c \ubc30\uc5f4\ub85c \uac00\uc838\uc635\ub2c8\ub2e4. <BR>&nbsp; return $ll; <BR>} <BR><\/DIV><BR>\u2514&#8211; default_control \ubd80\ubd84\uc774 \ud575\uc2ec\uc785\ub2c8\ub2e4. \ucee8\ud2b8\ub864\ub7ec\uc5d0 \uc788\uc5b4\uc57c\ud560 \ub0b4\uc6a9\uc774 \ubaa8\ub378\uc548\uc5d0 \ud568\uc218\ub85c \uc815\uc758\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. <BR>\uadf8\ub9ac\uace0 plusins\ub77c\ub294 \ucee8\ud2b8\ub864\uc5d0\uc11c default_control \ud568\uc218\uac00 \ucc98\ub9ac\ud55c \ub0b4\uc6a9\uc744 \ubc1b\uc544\uc11c <BR>CI \ud15c\ud50c\ub9bf \ud615\ud0dc\uc758 \ud30c\uc77c\uc778 main.tpl.php\ub85c \ubcf4\ub0b4\uc90d\ub2c8\ub2e4. <BR><BR>\uc704\uc640 \uac19\uc740 \uc791\uc5c5\uc744 \ud568\uc73c\ub85c\uc368 application \ub514\ub809\ud1a0\ub9ac \uc774\uc678\uc758 \uc678\ubd80 \ub514\ub809\ud1a0\ub9ac\uc5d0\uc11c\ub3c4 MVC \ud328\ud134(\uc5c4\ubc00\ud788 \ub9d0\ud558\uba74 \uc544\ub2c8\uc9c0\ub9cc, \ubaa8\ub378\uc548\uc5d0 \ucee8\ud2b8\ub864\ub7ec\uac00 \uad6c\ud604\ub418\uc5b4 \uc788\uc73c\ubbc0\ub85c)\uc744 <BR>\uadf8\ub300\ub85c \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ud2b9\ud788\ub098 \ub2e4\ub978 \uac1c\ubc1c\uc790\uac00 \ub9cc\ub4e0 \ud50c\ub7ec\uadf8\uc778 \uac19\uc740 \uacbd\uc6b0 \uc815\ud574\uc9c4 \uaddc\uc57d\ub300\ub85c\ub9cc \ub9cc\ub4e4\uba74(Functions.php main.tpl.php \ub4f1) <BR>CI\uc758 \uc8fc\uc18c\uccb4\uacc4\ub97c \uc774\uc6a9\ud558\uace0 CI \ub0b4\uc7a5\ud568\uc218\ub3c4 \uadf8\ub300\ub85c \uc774\uc6a9\uc744 \ud560 \uc218\uac00 \uc788\uc2b5\ub2c8\ub2e4. <BR><BR>\ud3c9\uc0c1\uc2dc \uac1c\ubc1c\uc5d0\uc11c\ub294 \uad6c\ud604\ud560 \ud544\uc694\uac00 \uc5c6\uc9c0\ub9cc \uc678\ubd80 \uac1c\ubc1c\uc790\ub4e4\uc774 \ub9cc\ub4e0 \ud50c\ub7ec\uadf8\uc778\uc744 \uc0ac\uc6a9\ud558\ub294 \uad6c\uc870\ub77c\uba74 \ud544\uc694\ud569\ub2c8\ub2e4. <BR><BR>\uc774 \ub0b4\uc6a9\uc744 \uc62c\ub9ac\ub294 \uac00\uc7a5 \ud070 \ubaa9\uc801\uc740 CI\uc758 \uc720\uc5f0\uc131\uc744 \ub9d0\ud558\uace0 \uc2f6\uc5b4\uc11c \uc785\ub2c8\ub2e4. <BR>\uc774\ubc88\uc5d0 CI\ub85c CMS \uc791\uc5c5\uc744 \ud558\uba74\uc11c \ub290\ub080 \uac83\uc740 CI\uc758 \ud655\uc7a5\uc131, \uc720\uc5f0\uc131\uc785\ub2c8\ub2e4. \uc5b4\ub290 \uc815\ub3c4 \ud504\ub808\uc784\uc6cc\ud06c\ub85c\uc11c\uc758 \ud2c0\uc744 \uac00\uc9c0\uace0 \uc788\uc9c0\ub9cc \uadf8 \ud2c0\uc744 \ub118\ub098\ub4e4 \uc218 \uc788\ub294 \uc720\uc5f0\uc131\uc744 \uac00\uc9c0\uace0 \uc788\ub2e4\ub294 \uac83. <BR>\ub2e4\uc2dc \ub9d0\ud574 \uac1c\ubc1c\uc790\ub4e4\uc774 \uc5b4\ub5bb\uac8c \uad6c\ud604\ud558\ub290\ub0d0\uc5d0 \ub530\ub77c \uc815\ub9d0 \uc5b4\ub5a4 \uad6c\uc870\ub358\uc9c0 \uac00\ub2a5\ud558\ub2e4\ub294 \uac83\uc785\ub2c8\ub2e4. <BR>\ud504\ub808\uc784\uc6cc\ud06c\uc758 \ud3b8\ub9ac\ud568(\ub0b4\uc7a5\ud568\uc218\ub4e4\uc758 \ud3b8\ub9ac\ud568, \uad6c\uc870\ud654, mvc\ud328\ud134 \ub4f1\ub4f1)\uc744 \uc0ac\uc6a9\ud558\uba74\uc11c \ub3d9\uc2dc\uc5d0 \uac1c\ubc1c\uc790\uc758 \uc7ac\ub7c9\uc5d0 \ub530\ub77c \uc5bc\ub9c8\ub4e0\uc9c0 \uae30\uc874 \uad6c\uc870\uc774\uc678\uc5d0 \uac83\uc744 \uc774\uc6a9\ud560 \uc218 \uc788\ub2e4\ub294 \uc810\uc774 \ud070 \uc7a5\uc810\uc774\ub77c\uace0 \ud560 \uc218 \uc788\uaca0\uc2b5\ub2c8\ub2e4. <BR><BR><\/SPAN><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc81c\ubaa9 \ubd99\uc774\uae30\uac00 \uc880 \uc5b4\ub835\ub124\uc694 CI\ub85c CMS\ub97c \uac1c\ubc1c\ud558\ub2e4\ubcf4\ub2c8 CI\ucf54\uc5b4\uc640 \ud50c\ub7ec\uadf8\uc778, \uc704\uc82f, \ub808\uc774\uc544\uc6c3 \ub4f1\uc744 \ubd84\ub9ac\ud574\uc57c\ud560 \ud544\uc694\uc131\uc774 \uc0dd\uacbc\uc2b5\ub2c8\ub2e4. \uadf8\ub9ac\uace0 \ud50c\ub7ec\uadf8\uc778\uc758 \ud2b9\uc131\uc0c1 \uc790\uae30 \uc790\uc2e0\ub9cc\uc73c\ub85c\ub3c4 \uc6f9\uc5d0\uc11c \ubcf4\uc77c \uc218 \uc788\uc5b4\uc57c \ud574\uc11c \uc8fc\uc18c\uccb4\uacc4\ub97c CI\uc758 \uc8fc\uc18c\uccb4\uacc4\ub85c \ub3d9\uc77c\ud558\uac8c \uc0ac\uc6a9\ud574\uc57c \ud588\uc2b5\ub2c8\ub2e4.(\ubcc0\uc218 \uc804\ub2ec\ub3c4 \ud3ec\ud568) application\/ plugins\/ widgets\/ layouts\/ system\/http:\/\/localhost\/plugins\/control\/board\/main&nbsp; &nbsp; &lt;- \uc774\ub807\uac8c \uc8fc\uc18c\ub97c \uc4f0\ub294\ub370 \ud50c\ub7ec\uadf8\uc778\uc911 \uac8c\uc2dc\ud310(board)\uc758 main.tpl.php(\ud15c\ud50c\ub9bf) \ud30c\uc77c\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4. \uc704 \uc8fc\uc18c\ub294 application\/controllers\/plugins.php \uc5d0 \uc5f0\uacb0\ub418\uc5b4\uc788\uace0 \uadf8 \ub0b4\uc6a9\uc740 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[51],"tags":[617,563,618,619,620,402,621,622,623,624],"class_list":["post-2868","post","type-post","status-publish","format-standard","hentry","category-papa-php","tag-cms","tag-codeigniter","tag-controller","tag-model","tag-mvc","tag-php","tag-621","tag-622","tag-623","tag-624"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/2868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2868"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/2868\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}