{"id":20786,"date":"2024-11-19T12:22:16","date_gmt":"2024-11-19T04:22:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20786\/"},"modified":"2024-11-19T12:22:16","modified_gmt":"2024-11-19T04:22:16","slug":"phpstorm%e6%80%8e%e4%b9%88%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20786\/","title":{"rendered":"phpstorm\u600e\u4e48\u914d\u7f6e\u73af\u5883"},"content":{"rendered":"<blockquote><p>\n  \u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5728 phpstorm \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff1a1. \u6253\u5f00 &#8220;edit configurations&#8221; \u5bf9\u8bdd\u6846\uff1b2. \u5355\u51fb &#8220;environment variables&#8221; \u9009\u9879\u5361\uff1b3. \u521b\u5efa\u65b0\u53d8\u91cf\uff0c\u8bbe\u7f6e\u540d\u79f0\u3001\u503c\u548c\u8303\u56f4\uff1b4. \u4fdd\u5b58\u66f4\u6539\u3002\u6b64\u5916\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u6587\u672c\u6587\u4ef6\u6216\u914d\u7f6e\u6587\u4ef6\u5bfc\u5165\u53d8\u91cf\u8bbe\u7f6e\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/07\/2024040722092198365.jpg\" class=\"aligncenter\" title=\"phpstorm\u600e\u4e48\u914d\u7f6e\u73af\u5883\u63d2\u56fe\" alt=\"phpstorm\u600e\u4e48\u914d\u7f6e\u73af\u5883\u63d2\u56fe\" \/><\/p>\n<h2>\u5982\u4f55\u5728 PhpStorm \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h2>\n<h3>\u6b65\u9aa4 1\uff1a\u6253\u5f00 &#8220;Environment Variables&#8221; \u5bf9\u8bdd\u6846<\/h3>\n<ul>\n<li>\u5728 PhpStorm \u4e2d\uff0c\u8f6c\u5230 &#8220;Run&#8221; \u83dc\u5355\u3002<\/li>\n<li>\u9009\u62e9 &#8220;Edit Configurations&#8221;\u3002<\/li>\n<li>\u5728\u5de6\u4fa7\u9762\u677f\u4e2d\uff0c\u9009\u62e9\u8981\u7f16\u8f91\u7684\u8fd0\u884c\/\u8c03\u8bd5\u914d\u7f6e\u3002<\/li>\n<li>\u5355\u51fb &#8220;Environment Variables&#8221; \u9009\u9879\u5361\u3002<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 2\uff1a\u521b\u5efa\u65b0\u53d8\u91cf<\/h3>\n<ul>\n<li>\u5355\u51fb &#8220;Add&#8221; \u6309\u94ae\u3002<\/li>\n<li>\u5728 &#8220;Variable name&#8221; \u5b57\u6bb5\u4e2d\uff0c\u8f93\u5165\u53d8\u91cf\u7684\u540d\u79f0\u3002<\/li>\n<li>\u5728 &#8220;Variable value&#8221; \u5b57\u6bb5\u4e2d\uff0c\u8f93\u5165\u53d8\u91cf\u7684\u503c\u3002<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 3\uff1a\u8bbe\u7f6e\u8303\u56f4<\/h3>\n<ul>\n<li>\n<p>\u5728 &#8220;Scope&#8221; \u4e0b\u62c9\u5217\u8868\u4e2d\uff0c\u9009\u62e9\u8981\u5728\u5176\u4e2d\u4f7f\u7528\u8be5\u53d8\u91cf\u7684\u8303\u56f4\uff1a<\/p>\n<ul>\n<li>&#8220;Project&#8221;\uff1a\u5728\u6574\u4e2a\u9879\u76ee\u4e2d\u4f7f\u7528\u3002<\/li>\n<li>&#8220;Module&#8221;\uff1a\u5728\u7279\u5b9a\u7684\u6a21\u5757\u4e2d\u4f7f\u7528\u3002<\/li>\n<li>&#8220;Environment&#8221;\uff1a\u5728\u7279\u5b9a\u7684\u73af\u5883\u4e2d\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 4\uff1a\u4fdd\u5b58\u66f4\u6539<\/h3>\n<ul>\n<li>\u5355\u51fb &#8220;OK&#8221; \u6309\u94ae\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<\/ul>\n<h3>\u5176\u4ed6\u9009\u9879<\/h3>\n<h4>\u5728\u6587\u672c\u5b57\u6bb5\u4e2d\u8bbe\u7f6e\u53d8\u91cf<\/h4>\n<p>\u9664\u4e86\u624b\u52a8\u8f93\u5165\u53d8\u91cf\u503c\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6587\u672c\u5b57\u6bb5\u6765\u8bbe\u7f6e\u53d8\u91cf\uff1a<\/p>\n<ul>\n<li>\u5728 &#8220;Text file path&#8221; \u5b57\u6bb5\u4e2d\uff0c\u8f93\u5165\u5305\u542b\u53d8\u91cf\u503c\u7684\u6587\u672c\u6587\u4ef6\u8def\u5f84\u3002<\/li>\n<li>\u786e\u4fdd\u6587\u4ef6\u4e2d\u7684\u53d8\u91cf\u540d\u79f0\u548c\u503c\u4e0e\u6240\u9700\u7684\u53d8\u91cf\u540d\u79f0\u548c\u503c\u5339\u914d\u3002<\/li>\n<\/ul>\n<h4>\u4ece\u914d\u7f6e\u6587\u4ef6\u5bfc\u5165\u53d8\u91cf<\/h4>\n<p>\u5982\u679c\u60a8\u6709\u5305\u542b\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u60a8\u53ef\u4ee5\u5c06\u5176\u5bfc\u5165 PhpStorm\uff1a<\/p>\n<ul>\n<li>\u5355\u51fb &#8220;Import&#8221; \u6309\u94ae\u3002<\/li>\n<li>\u9009\u62e9\u8981\u5bfc\u5165\u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<li>PhpStorm \u5c06\u4ece\u6587\u4ef6\u4e2d\u5bfc\u5165\u53d8\u91cf\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u914d\u7f6e\u73af\u5883\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>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5728 phpstorm \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff1a1. \u6253\u5f00 &#8220;edit configurations&#8221; \u5bf9\u8bdd\u6846\uff1b2. \u5355\u51fb &#8220;environment variables&#8221; \u9009\u9879\u5361\uff1b3. \u521b\u5efa\u65b0\u53d8\u91cf\uff0c\u8bbe\u7f6e\u540d\u79f0\u3001\u503c\u548c\u8303\u56f4\uff1b4. \u4fdd\u5b58\u66f4\u6539\u3002\u6b64\u5916\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u6587\u672c\u6587\u4ef6\u6216\u914d\u7f6e\u6587\u4ef6\u5bfc\u5165\u53d8\u91cf\u8bbe\u7f6e\u3002 \u5982\u4f55\u5728 PhpStorm \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf \u6b65\u9aa4 1\uff1a\u6253\u5f00 &#8220;Environment Variables&#8221; \u5bf9\u8bdd\u6846 \u5728 PhpStorm \u4e2d\uff0c\u8f6c\u5230 &#8220;Run&#8221; \u83dc\u5355\u3002 \u9009\u62e9 &#8220;Edit Configurations&#8221;\u3002 \u5728\u5de6\u4fa7\u9762\u677f\u4e2d\uff0c\u9009\u62e9\u8981\u7f16\u8f91\u7684\u8fd0\u884c\/\u8c03\u8bd5\u914d\u7f6e\u3002 \u5355\u51fb &#8220;Environment Variables&#8221; \u9009\u9879\u5361\u3002 \u6b65\u9aa4 2\uff1a\u521b\u5efa\u65b0\u53d8\u91cf \u5355\u51fb &#8220;Add&#8221; \u6309\u94ae\u3002 \u5728 &#8220;Variable name&#8221; \u5b57\u6bb5\u4e2d\uff0c\u8f93\u5165\u53d8\u91cf\u7684\u540d\u79f0\u3002 \u5728 &#8220;Variable value&#8221; \u5b57\u6bb5\u4e2d\uff0c\u8f93\u5165\u53d8\u91cf\u7684\u503c\u3002 \u6b65\u9aa4 3\uff1a\u8bbe\u7f6e\u8303\u56f4 \u5728 &#8220;Scope&#8221; \u4e0b\u62c9\u5217\u8868\u4e2d\uff0c\u9009\u62e9\u8981\u5728\u5176\u4e2d\u4f7f\u7528\u8be5\u53d8\u91cf\u7684\u8303\u56f4\uff1a &#8220;Project&#8221;\uff1a\u5728\u6574\u4e2a\u9879\u76ee\u4e2d\u4f7f\u7528\u3002 &#8220;Module&#8221;\uff1a\u5728\u7279\u5b9a\u7684\u6a21\u5757\u4e2d\u4f7f\u7528\u3002 &#8220;Environment&#8221;\uff1a\u5728\u7279\u5b9a\u7684\u73af\u5883\u4e2d\u4f7f\u7528\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20786","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20786","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=20786"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20786\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}