{"id":730,"date":"2012-08-11T14:13:11","date_gmt":"2012-08-11T06:13:11","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=730"},"modified":"2012-08-11T14:13:11","modified_gmt":"2012-08-11T06:13:11","slug":"php%e5%87%bd%e6%95%b0-%e5%8f%96%e5%87%ba%e6%95%b0%e6%8d%ae%e5%ba%93%e4%b8%ad%e7%9a%84%e5%85%a8%e5%b1%80%e8%ae%be%e7%bd%ae-settings","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/730","title":{"rendered":"php\u51fd\u6570-\u53d6\u51fa\u6570\u636e\u5e93\u4e2d\u7684\u5168\u5c40\u8bbe\u7f6e-settings"},"content":{"rendered":"

\u76f4\u63a5\u4e0a\u5427\uff0c\u5176\u5b9e\u975e\u5e38\u7684\u7b80\u5355<\/p>\n

<?php
\n\/*\u8fd9\u662f\u4e00\u4e2a\u53d6\u5f97\u6307\u5b9a\u8868\u4e2d\uff0c\u6307\u5b9a\u5b57\u6bb5\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u5e38\u7528\u5728\u53d6\u7f51\u7ad9\u57fa\u672c\u8bbe\u7f6e\u4e2dwww.youthtribe.com-\u5c0f\u767d*\/<\/a>
\nfunction GetSettings($tablename,$field){
\n\u00a0$sql_get=mysql_query(“select * from $tablename”);
\n\u00a0$sql=mysql_fetch_array($sql_get);
\n\u00a0$result=$sql[“$field”];
\n\u00a0return $result;<\/p>\n

}
\necho GetSettings(nbadashi_settings,domain);
\n?><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u76f4\u63a5\u4e0a\u5427\uff0c\u5176\u5b9e\u975e\u5e38\u7684\u7b80\u5355 <?php \/*\u8fd9\u662f\u4e00\u4e2a\u53d6\u5f97\u6307\u5b9a\u8868\u4e2d\uff0c\u6307\u5b9a\u5b57\u6bb5\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u5e38\u7528\u5728\u53d6\u7f51\u7ad9\u57fa\u672c\u8bbe\u7f6e\u4e2dwww.youthtribe.com-\u5c0f\u767d*\/ function GetSettings($tablename,$field){ \u00a0$sql_get=mysql_query(“select * from $tablename”); \u00a0$sql=mysql_fetch_array($sql_get); \u00a0$result=$sql[“$field”]; \u00a0return $result; } echo GetSettings(nbadashi<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,9],"tags":[126],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/730"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=730"}],"version-history":[{"count":3,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/730\/revisions"}],"predecessor-version":[{"id":733,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/730\/revisions\/733"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=730"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}