{"id":1261,"date":"2013-05-28T09:19:17","date_gmt":"2013-05-28T09:19:17","guid":{"rendered":"http:\/\/brain.payzip.co.kr\/?p=1261"},"modified":"2013-05-28T09:19:17","modified_gmt":"2013-05-28T09:19:17","slug":"php-%eb%8b%ab%ea%b8%b0%ed%83%9c%ea%b7%b8-php-closing-tag-output%ec%9d%b4-%eb%90%9c%eb%8b%a4","status":"publish","type":"post","link":"https:\/\/blog.goorigo.com\/?p=1261","title":{"rendered":"php \ub2eb\uae30\ud0dc\uadf8 (PHP Closing Tag) &#8211; Output\uc774 \ub41c\ub2e4."},"content":{"rendered":"<h2>PHP Closing Tag<\/h2>\n<div>The PHP closing tag on a PHP document\u00a0<strong>?&gt;<\/strong>\u00a0is optional to the PHP parser. However, if used, any whitespace following the closing tag, whether introduced by the developer, user, or an FTP application, can cause unwanted output, PHP errors, or if the latter are suppressed, blank pages. For this reason, all PHP files should\u00a0<strong>OMIT<\/strong>\u00a0the closing PHP tag, and instead use a comment block to mark the end of file and it&#8217;s location relative to the application root. This allows you to still identify a file as being complete and not truncated.<code><strong>INCORRECT<\/strong>:<br \/>\n&lt;?php echo \"Here's my code!\"; ?&gt;<br \/>\n<strong><br \/>\nCORRECT<\/strong>:<br \/>\n&lt;?php echo \"Here's my code!\";<br \/>\n\/* End of file myfile.php *\/<br \/>\n\/* Location: .\/system\/modules\/mymodule\/myfile.php *\/<\/code><\/div>\n<div><\/div>\n<div><span style=\"font-family: monospace;\">\uc5c7&#8230; php \ub2eb\uae30 \ud0dc\uadf8\ud558\uba74 output \ub418\ub294\uad6c\ub098&#8230; \u3161_\u315c \uc8fc\uc758\ud558\uc790<\/span><\/div>\n<div>redirect\ud560\ub54c \uc624\ub958\uba54\uc138\uc9c0\uac00 \uc65c\ucf00\ub728\ub098\ud588\ub2e4.<\/div>\n<h2><!--more--><\/h2>\n<h2><\/h2>\n<p>** \ud55c\uad6d\uc5b4\ub85c \uc694\uc57d**<br \/>\n\ud30c\uc77c \ub05d\uc5d0 \uc2a4\ud398\uc774\uc2a4\ub098 \uc5d4\ud130\uac00 \ub4e4\uc5b4\uac00\uba74 php\ud30c\uc77c\uc758 output\uc774 \uc0dd\uae41\ub2c8\ub2e4.<br \/>\noutput\uc774 \uc0dd\uae30\uba74 \uc6f9\uc11c\ubc84\uc5d0\uc11c \ud5e4\ub354\ub97c \uc50c\uc6b0\uace0 \ucd9c\ub825\uc744 \ub0b4\ubcf4\ub0c5\ub2c8\ub2e4.<\/p>\n<p>\uc694\uc998 \ud504\ub85c\uadf8\ub798\ubc0d \ubc29\uc2dd\uc778 MVC \ud504\ub85c\uadf8\ub798\ubc0d\uc5d0\uc11c\ub294 (\ubaa8\ub378, \ubdf0, \ucee8\ud2b8\ub864\ub7ec, \ud57c\ud37c, \ub77c\uc774\ube0c\ub7ec\ub9ac \ub4f1\ub4f1) \u00a0\ub9ce\uc740 \uac83\uc744 \ub85c\ub4dc\ud558\uace0 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.<br \/>\n\uadf8\ub7f0\ub370 \uc2e4\uc218\ub85c \ud30c\uc77c\uc5d0 \uc2a4\ud398\uc774\uc2a4\ubc14(\uacf5\ubc31)\uac00 \ub4e4\uc5b4\uac00\ubc84\ub9ac\uba74<br \/>\n\ub9dd\ud558\ubbc0\ub85c<\/p>\n<p>\uc778\ud074\ub8e8\ub4dc \ub420 \ubaa8\ub4c8\ud30c\uc77c\uc740 \ub418\ub3c4\ub85d php closing tag\ub294 \uc548\uc4f0\ub294\uac8c \uc88b\uc2b5\ub2c8\ub2e4.<\/p>\n<p><span style=\"color: #9b18c1;\">\uc989 \ud654\uba74\uc5d0 \uc544\ubb34\ub7f0 \ucd9c\ub825\uc774 \ud544\uc694\uc5c6\ub294 \ud30c\uc77c\uc774\uba74 (\uace7 \uc18c\uc2a4 \uc804\uccb4\uac00 php\uc774\uba74) close tag( ?&gt;) \ub97c \uc0dd\ub7b5\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4.<br \/>\n<\/span>(\uc544 \ubb3c\ub860 \uc77c\ubc18 \ucf54\ub529\uc5d0\uc11c\ub294 \ub2eb\uc73c\uc154\uc57c \ud569\ub2c8\ub2e4.)<br \/>\n&lt;body&gt;<br \/>\n&lt;?php<br \/>\necho &#8216;hello world!&#8217;;<br \/>\n?&gt;<br \/>\nmyday<br \/>\n&lt;\/body&gt;<\/p>\n<p>\uc774\ub7f0 \ucf54\ub4dc\ub97c \uc9dc\uc2e0\ub2e4\uba74 \ub2f9\uc5f0\ud788 \ub2eb\uc544\uc57c \uaca0\uc8e0?<\/p>\n<p>&nbsp;<\/p>\n<p>\ucd9c\ucc98:<a href=\"https:\/\/lael.be\/i\/entry\/171\">https:\/\/lael.be\/i\/entry\/171<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP Closing Tag The PHP closing tag on a PHP document\u00a0?&gt;\u00a0is optional to the PHP parser. However, if used, any whitespace following the closing tag, whether introduced by the developer,&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts\/1261"}],"collection":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1261"}],"version-history":[{"count":0,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts\/1261\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}