{"id":34065,"date":"2024-11-25T12:00:27","date_gmt":"2024-11-25T04:00:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/34065\/"},"modified":"2024-11-25T12:00:27","modified_gmt":"2024-11-25T04:00:27","slug":"%e5%b8%9d%e5%9b%bdcms%e6%95%b0%e6%8d%ae%e5%ba%93%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e5%9c%a8%e5%93%aa%e9%87%8c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/34065\/","title":{"rendered":"\u5e1d\u56fdcms\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u91cc"},"content":{"rendered":"<blockquote><p>\n  empirecms\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e\/data\/config\/dbconfig.php\u4e2d\uff0c\u5305\u542b\u4ee5\u4e0b\u4fe1\u606f\uff1a1\uff09\u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740\uff08$dbhost\uff09\uff1b2\uff09\u6570\u636e\u5e93\u670d\u52a1\u5668\u7aef\u53e3\uff08$dbport\uff09\uff1b3\uff09\u6570\u636e\u5e93\u540d\u79f0\uff08$dbname\uff09\uff1b4\uff09\u6570\u636e\u5e93\u7528\u6237\u540d\uff08$dbuser\uff09\uff1b5\uff09\u6570\u636e\u5e93\u5bc6\u7801\uff08$dbpass\uff09\uff1b6\uff09\u6570\u636e\u5e93\u5b57\u7b26\u96c6\uff08$dbchar\uff09\u3002\u4fee\u6539\u8fde\u63a5\u4fe1\u606f\u9700\u8981\u7f16\u8f91dbconfig.php\u6587\u4ef6\u5e76\u66f4\u65b0\u76f8\u5e94\u7684\u503c\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/17\/2024041706452180337.jpg\" class=\"aligncenter\" title=\"\u5e1d\u56fdcms\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u91cc\u63d2\u56fe\" alt=\"\u5e1d\u56fdcms\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u91cc\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5e1d\u56fd CMS \u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u7684\u4f4d\u7f6e<\/strong><\/p>\n<p>\u5e1d\u56fd CMS \u7684\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\u4ee5\u4e0b\u8def\u5f84\uff1a<\/p>\n<p>\/data\/config\/dbconfig.php<\/p>\n<p><strong>\u914d\u7f6e\u6587\u4ef6\u5185\u5bb9<\/strong><\/p>\n<p>dbconfig.php \u6587\u4ef6\u5305\u542b\u4e86 EmpireCMS \u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>$dbhost\uff1a\u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740\u6216 IP \u5730\u5740<\/li>\n<li>$dbport\uff1a\u6570\u636e\u5e93\u670d\u52a1\u5668\u7aef\u53e3<\/li>\n<li>$dbname\uff1a\u6570\u636e\u5e93\u540d\u79f0<\/li>\n<li>$dbuser\uff1a\u6570\u636e\u5e93\u7528\u6237\u540d<\/li>\n<li>$dbpass\uff1a\u6570\u636e\u5e93\u5bc6\u7801<\/li>\n<li>$dbchar\uff1a\u6570\u636e\u5e93\u5b57\u7b26\u96c6<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f EmpireCMS dbconfig.php \u6587\u4ef6\u7684\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<pre>&lt;?php\n\/\/ \u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740\n$dbhost = 'localhost';\n\n\/\/ \u6570\u636e\u5e93\u670d\u52a1\u5668\u7aef\u53e3\n$dbport = 3306;\n\n\/\/ \u6570\u636e\u5e93\u540d\u79f0\n$dbname = 'empirecms';\n\n\/\/ \u6570\u636e\u5e93\u7528\u6237\u540d\n$dbuser = 'root';\n\n\/\/ \u6570\u636e\u5e93\u5bc6\u7801\n$dbpass = 'password';\n\n\/\/ \u6570\u636e\u5e93\u5b57\u7b26\u96c6\n$dbchar = 'utf8';\n?&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n<p>\u8981\u4fee\u6539\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f\uff0c\u53ea\u9700\u7f16\u8f91 dbconfig.php \u6587\u4ef6\u5e76\u66f4\u65b0\u76f8\u5e94\u7684\u503c\u3002\u4f8b\u5982\uff0c\u8981\u66f4\u6539\u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740\uff0c\u53ea\u9700\u4fee\u6539 $dbhost \u53d8\u91cf\u7684\u503c\u3002<\/p>\n<p><strong>\u91cd\u8981\u63d0\u793a\uff1a<\/strong><\/p>\n<p>\u5728\u4fee\u6539 dbconfig.php \u6587\u4ef6\u4e4b\u524d\uff0c\u5f3a\u70c8\u5efa\u8bae\u5148\u5907\u4efd\u8be5\u6587\u4ef6\u3002\u8fd9\u5c06\u786e\u4fdd\u5728\u51fa\u73b0\u4efb\u4f55\u610f\u5916\u95ee\u9898\u65f6\u53ef\u4ee5\u8f7b\u677e\u6062\u590d\u6570\u636e\u5e93\u8fde\u63a5\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u91cc\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>empirecms\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e\/data\/config\/dbconfig.php\u4e2d\uff0c\u5305\u542b\u4ee5\u4e0b\u4fe1\u606f\uff1a1\uff09\u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740\uff08$dbhost\uff09\uff1b2\uff09\u6570\u636e\u5e93\u670d\u52a1\u5668\u7aef\u53e3\uff08$dbport\uff09\uff1b3\uff09\u6570\u636e\u5e93\u540d\u79f0\uff08$dbname\uff09\uff1b4\uff09\u6570\u636e\u5e93\u7528\u6237\u540d\uff08$dbuser\uff09\uff1b5\uff09\u6570\u636e\u5e93\u5bc6\u7801\uff08$dbpass\uff09\uff1b6\uff09\u6570\u636e\u5e93\u5b57\u7b26\u96c6\uff08$dbchar\uff09\u3002\u4fee\u6539\u8fde\u63a5\u4fe1\u606f\u9700\u8981\u7f16\u8f91dbconfig.php\u6587\u4ef6\u5e76\u66f4\u65b0\u76f8\u5e94\u7684\u503c\u3002 \u5e1d\u56fd CMS \u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u7684\u4f4d\u7f6e \u5e1d\u56fd CMS \u7684\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\u4ee5\u4e0b\u8def\u5f84\uff1a \/data\/config\/dbconfig.php \u914d\u7f6e\u6587\u4ef6\u5185\u5bb9 dbconfig.php \u6587\u4ef6\u5305\u542b\u4e86 EmpireCMS \u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f\uff0c\u5305\u62ec\uff1a $dbhost\uff1a\u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740\u6216 IP \u5730\u5740 $dbport\uff1a\u6570\u636e\u5e93\u670d\u52a1\u5668\u7aef\u53e3 $dbname\uff1a\u6570\u636e\u5e93\u540d\u79f0 $dbuser\uff1a\u6570\u636e\u5e93\u7528\u6237\u540d $dbpass\uff1a\u6570\u636e\u5e93\u5bc6\u7801 $dbchar\uff1a\u6570\u636e\u5e93\u5b57\u7b26\u96c6 \u793a\u4f8b\u914d\u7f6e\u6587\u4ef6 \u4ee5\u4e0b\u662f EmpireCMS dbconfig.php \u6587\u4ef6\u7684\u4e00\u4e2a\u793a\u4f8b\uff1a &lt;?php \/\/ \u6570\u636e\u5e93\u670d\u52a1\u5668\u5730\u5740 $dbhost = &#8216;localhost&#8217;; \/\/ \u6570\u636e\u5e93\u670d\u52a1\u5668\u7aef\u53e3 $dbport = 3306; \/\/ \u6570\u636e\u5e93\u540d\u79f0 $dbname = &#8217;empirecms&#8217;; \/\/ \u6570\u636e\u5e93\u7528\u6237\u540d $dbuser = &#8216;root&#8217;; \/\/ \u6570\u636e\u5e93\u5bc6\u7801 $dbpass = &#8216;password&#8217;; \/\/ \u6570\u636e\u5e93\u5b57\u7b26\u96c6 $dbchar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-34065","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/34065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=34065"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/34065\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=34065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=34065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=34065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}