{"id":6682,"date":"2016-01-13T22:37:05","date_gmt":"2016-01-13T13:37:05","guid":{"rendered":"http:\/\/nanoappli.com\/blog\/?p=6682"},"modified":"2016-01-13T22:37:05","modified_gmt":"2016-01-13T13:37:05","slug":"smartyphp%e3%81%a7%e3%82%bb%e3%83%83%e3%83%88%e3%81%97%e3%81%9fdefinekey-value%e3%81%ae%e5%ae%9a%e6%95%b0%e3%82%92smary%e3%81%a7%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"http:\/\/nanoappli.com\/blog\/archives\/6682","title":{"rendered":"[Smarty]PHP\u3067\u30bb\u30c3\u30c8\u3057\u305fdefine(&#8220;KEY&#8221;, &#8220;value&#8221;)\u306e\u5b9a\u6570\u3092Smary\u3067\u8868\u793a\u3059\u308b"},"content":{"rendered":"<p>\nPHP\u3067\u306f\u3001\u5b9a\u6570\u3092define()\u95a2\u6570\u3067\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\nview\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306bSmarty\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u306e\u5b9a\u6570\u306f$smarty.const\u3067\u53d6\u5f97\u53ef\u80fd\u3067\u3059\u3002<br \/>\n<br \/>\n\u4ee5\u4e0b\u3001\u30b3\u30fc\u30c9\u4f8b\u3067\u3059\u3002<br \/>\ntest.php<br \/>\n<pre lang=\"php\">\n<?php\ndefine(\"MESSAGE\", \"hello world\");\n<\/pre>\n<br \/>\ntest.tpl<br \/>\n<pre lang=\"x\">\n{$smarty.const.MESSAGE}\n<\/pre>\n<br \/>\n<br \/>\n\u3053\u308c\u3067\u3001\u753b\u9762\u306bhello world\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u3067\u306f\u3001\u5b9a\u6570\u3092define()\u95a2\u6570\u3067\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 view\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306bSmarty\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u306e\u5b9a\u6570\u306f$smarty.const\u3067\u53d6\u5f97\u53ef\u80fd\u3067\u3059\u3002 \u4ee5\u4e0b\u3001\u30b3\u30fc\u30c9\u4f8b\u3067\u3059\u3002 test.php<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[22],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":5541,"url":"http:\/\/nanoappli.com\/blog\/archives\/5541","url_meta":{"origin":6682,"position":0},"title":"[PIC]C18\u30b3\u30f3\u30d1\u30a4\u30e9\u3067sprintf\u3092\u4f7f\u3046\u6642\u306e\u6ce8\u610f","date":"2015\u5e7412\u670823\u65e5","format":false,"excerpt":"sprintf\u306e\u7b2c\u4e8c\u5f15\u6570\u3067\u6307\u5b9a\u3059\u308b\u6587\u5b57\u5217\u306f\u3001\u6587\u5b57\u5217\u5b9a\u6570\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 OK\u306a\u30d1\u30bf\u30fc\u30f3 s\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3464,"url":"http:\/\/nanoappli.com\/blog\/archives\/3464","url_meta":{"origin":6682,"position":1},"title":"[gcc]\u5024\u30922\u9032\u6570\u3067\u8868\u8a18\u3059\u308b","date":"2012\u5e747\u67086\u65e5","format":false,"excerpt":"C\u8a00\u8a9e\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\"0x\"\u306e\u63a5\u982d\u8a9e\u306716\u9032\u6570\u306e\u5024\u3092\u6307\u5b9a\u53ef\u80fd\u3067\u3059\u304c\u3001gcc\u3067\u306f\"0b\"\u306e\u63a5\u982d\u8a9e\u3092\u4ed8\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6301,"url":"http:\/\/nanoappli.com\/blog\/archives\/6301","url_meta":{"origin":6682,"position":2},"title":"[Smarty]&#8221;Call of unknown method &#8216;assign_by_ref&#8221;\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u7406\u7531","date":"2013\u5e741\u670813\u65e5","format":false,"excerpt":"PHP\u3067\u3001Smarty\u3092\u4f7f\u3063\u305f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u5834\u5408\u304c\u6709\u308a\u307e\u3059\u3002 (\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3595,"url":"http:\/\/nanoappli.com\/blog\/archives\/3595","url_meta":{"origin":6682,"position":3},"title":"[C\u8a00\u8a9e\u5165\u9580]\u8907\u6570\u306e\u5206\u5c90\u3092switch\u3067\u30b7\u30f3\u30d7\u30eb\u306b\u8a18\u8ff0\u3059\u308b","date":"2012\u5e747\u670813\u65e5","format":false,"excerpt":"\u524d\u56de\u3001if\u6587\u306b\u3088\u308b\u51e6\u7406\u306e\u5206\u5c90\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002 C\u8a00\u8a9e\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306fif\u3055\u3048\u3042\u308c\u3070\u3042\u3089\u3086\u308b\u5206\u5c90\u306f\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7503,"url":"http:\/\/nanoappli.com\/blog\/archives\/7503","url_meta":{"origin":6682,"position":4},"title":"cURL\u3067\u3001\u30a8\u30e9\u30fc&#8221;Initializing NSS with certpath: none&#8221;\u51fa\u308b\u7406\u7531\u3092\u3001\u30bd\u30fc\u30b9\u304b\u3089\u8abf\u3079\u3066\u307f\u305f","date":"2016\u5e745\u67086\u65e5","format":false,"excerpt":"Linux\u4e0a\u3067\u5b9f\u884c\u3059\u308bPHP\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u3001curl\u3092\u4f7f\u7528\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u30c6\u30b9\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4094,"url":"http:\/\/nanoappli.com\/blog\/archives\/4094","url_meta":{"origin":6682,"position":5},"title":"[PIC]HI-TECH C\u3067\u4e00\u5b9a\u6642\u9593\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u308b","date":"2012\u5e748\u670827\u65e5","format":false,"excerpt":"PIC\u3067\u306f\u3001HI-TECH C\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u3092\u4f7f\u7528\u3057\u305f\u3001C\u8a00\u8a9e\u306b\u3088\u308b\u958b\u767a\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 C\u8a00\u8a9e\u3067\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/6682"}],"collection":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/comments?post=6682"}],"version-history":[{"count":6,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/6682\/revisions"}],"predecessor-version":[{"id":6717,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/6682\/revisions\/6717"}],"wp:attachment":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/media?parent=6682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/categories?post=6682"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/tags?post=6682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}