{"id":21590,"date":"2024-11-19T17:05:45","date_gmt":"2024-11-19T09:05:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21590\/"},"modified":"2024-11-19T17:05:45","modified_gmt":"2024-11-19T09:05:45","slug":"phpstorm%e6%80%8e%e4%b9%88%e6%90%ad%e5%bb%ba%e7%bd%91%e7%ab%99","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21590\/","title":{"rendered":"phpstorm\u600e\u4e48\u642d\u5efa\u7f51\u7ad9"},"content":{"rendered":"<blockquote><p>\n  \u5982\u4f55\u642d\u5efa\u7f51\u7ad9\uff1a\u521b\u5efa phpstorm \u9879\u76ee\uff0c\u8bbe\u7f6e web \u670d\u52a1\u5668\u548c\u6570\u636e\u5e93\u3002\u521b\u5efa\u76ee\u5f55\u7ed3\u6784\uff0c\u5305\u542b\u63a7\u5236\u5668\u3001\u6a21\u578b\u548c\u89c6\u56fe\u6587\u4ef6\u3002\u8bbe\u7f6e\u8def\u7531\u903b\u8f91\u3002\u7f16\u5199\u4e1a\u52a1\u903b\u8f91\u548c\u524d\u7aef\u4ee3\u7801\u3002\u6d4b\u8bd5\u5e76\u5728\u751f\u4ea7\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u7f51\u7ad9\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/05\/2024060500452189153.jpg\" class=\"aligncenter\" title=\"phpstorm\u600e\u4e48\u642d\u5efa\u7f51\u7ad9\u63d2\u56fe\" alt=\"phpstorm\u600e\u4e48\u642d\u5efa\u7f51\u7ad9\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 PhpStorm \u4e2d\u642d\u5efa\u7f51\u7ad9<\/strong><\/p>\n<p><strong>\u642d\u5efa\u7f51\u7ad9\u7684\u6b65\u9aa4\uff1a<\/strong><\/p>\n<p><strong>1. \u521b\u5efa\u9879\u76ee<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 PhpStorm\uff0c\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684 &#8220;File&#8221; \u2192 &#8220;New&#8221; \u2192 &#8220;Project&#8230;&#8221;\u3002<\/li>\n<li>\u5728 &#8220;New Project&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9 &#8220;Web Application&#8221; \u6a21\u677f\u5e76\u8f93\u5165\u9879\u76ee\u540d\u79f0\u548c\u8def\u5f84\u3002<\/li>\n<li>\u9009\u62e9 PHP \u7248\u672c\u548c Web \u670d\u52a1\u5668\u7c7b\u578b\uff08\u5982 Apache \u6216 Nginx\uff09\uff0c\u7136\u540e\u70b9\u51fb &#8220;Create&#8221;\u3002<\/li>\n<\/ul>\n<p><strong>2. \u8bbe\u7f6e Web \u670d\u52a1\u5668<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u5728 &#8220;Run&#8221; \u83dc\u5355\u4e2d\uff0c\u9009\u62e9 &#8220;Edit Configurations&#8230;&#8221;\u3002<\/li>\n<li>\u5728 &#8220;Run\/Debug Configurations&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u70b9\u51fb &#8220;+&#8221; \u6309\u94ae\u5e76\u9009\u62e9\u6240\u9700\u7684 Web \u670d\u52a1\u5668\u7c7b\u578b\u3002<\/li>\n<li>\u914d\u7f6e Web \u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u5982\u7aef\u53e3\u53f7\u548c\u6587\u6863\u6839\u76ee\u5f55\u3002<\/li>\n<\/ul>\n<p><strong>3. \u521b\u5efa\u6570\u636e\u5e93<\/strong><\/p>\n<ul>\n<li>\u5728\u6570\u636e\u5e93\u7ba1\u7406\u5de5\u5177\u4e2d\uff08\u5982 MySQL Workbench\uff09\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u6570\u636e\u5e93\u3002<\/li>\n<li>\u5728 PhpStorm \u4e2d\uff0c\u70b9\u51fb &#8220;Database&#8221; \u5de5\u5177\u7a97\u53e3\u5e76\u8fde\u63a5\u5230\u521b\u5efa\u7684\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<p><strong>4. \u521b\u5efa\u9879\u76ee\u7ed3\u6784<\/strong><\/p>\n<ul>\n<li>\u5728 PhpStorm \u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u9879\u76ee\u6839\u76ee\u5f55\u5e76\u9009\u62e9 &#8220;New&#8221; \u2192 &#8220;Directory&#8221;\uff0c\u521b\u5efa\u5fc5\u8981\u7684\u76ee\u5f55\u7ed3\u6784\uff0c\u5982 &#8220;app&#8221;\u3001&#8221;public&#8221; \u548c &#8220;vendor&#8221;\u3002<\/li>\n<li>\u5728 &#8220;app&#8221; \u76ee\u5f55\u4e2d\uff0c\u521b\u5efa\u63a7\u5236\u5668\u3001\u6a21\u578b\u548c\u89c6\u56fe\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>5. \u8bbe\u7f6e\u8def\u7531<\/strong><\/p>\n<ul>\n<li>\u5728 &#8220;public&#8221; \u76ee\u5f55\u4e2d\uff0c\u521b\u5efa\u4e00\u4e2a &#8220;index.php&#8221; \u6587\u4ef6\uff0c\u5305\u542b\u8def\u7531\u903b\u8f91\u3002<\/li>\n<li>\u4f7f\u7528\u8def\u7531\u5e93\uff08\u5982 Laravel\uff09\u6216\u539f\u751f PHP \u8def\u7531\u529f\u80fd\u6765\u5b9a\u4e49 URL \u8def\u7531\u3002<\/li>\n<\/ul>\n<p><strong>6. \u7f16\u5199\u4ee3\u7801<\/strong><\/p>\n<ul>\n<li>\u5728\u63a7\u5236\u5668\u548c\u6a21\u578b\u7c7b\u4e2d\u7f16\u5199\u4e1a\u52a1\u903b\u8f91\u3002<\/li>\n<li>\u5728\u89c6\u56fe\u6587\u4ef6\u4e2d\u7f16\u5199 HTML \u548c PHP \u4ee3\u7801\u6765\u663e\u793a\u6570\u636e\u3002<\/li>\n<\/ul>\n<p><strong>7. \u6d4b\u8bd5\u548c\u90e8\u7f72<\/strong><\/p>\n<ul>\n<li>\u5728 PhpStorm \u4e2d\u8fd0\u884c\u5185\u7f6e\u7684 Web \u670d\u52a1\u5668\uff0c\u6d4b\u8bd5\u7f51\u7ad9\u3002<\/li>\n<li>\u4e00\u65e6\u7f51\u7ad9\u6b63\u5e38\u8fd0\u884c\uff0c\u5c06\u5176\u90e8\u7f72\u5230\u751f\u4ea7\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<\/ul>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff08\u5982 Git\uff09\u6765\u7ba1\u7406\u4ee3\u7801\u66f4\u6539\u3002<\/li>\n<li>\u4f7f\u7528  \u7ba1\u7406\u7b2c\u4e09\u65b9\u4f9d\u8d56\u9879\u3002<\/li>\n<li>\u542f\u7528 Xdebug \u4ee5\u8fdb\u884c\u8c03\u8bd5\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u642d\u5efa\u7f51\u7ad9\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>\u5982\u4f55\u642d\u5efa\u7f51\u7ad9\uff1a\u521b\u5efa phpstorm \u9879\u76ee\uff0c\u8bbe\u7f6e web \u670d\u52a1\u5668\u548c\u6570\u636e\u5e93\u3002\u521b\u5efa\u76ee\u5f55\u7ed3\u6784\uff0c\u5305\u542b\u63a7\u5236\u5668\u3001\u6a21\u578b\u548c\u89c6\u56fe\u6587\u4ef6\u3002\u8bbe\u7f6e\u8def\u7531\u903b\u8f91\u3002\u7f16\u5199\u4e1a\u52a1\u903b\u8f91\u548c\u524d\u7aef\u4ee3\u7801\u3002\u6d4b\u8bd5\u5e76\u5728\u751f\u4ea7\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u7f51\u7ad9\u3002 \u5982\u4f55\u5728 PhpStorm \u4e2d\u642d\u5efa\u7f51\u7ad9 \u642d\u5efa\u7f51\u7ad9\u7684\u6b65\u9aa4\uff1a 1. \u521b\u5efa\u9879\u76ee \u6253\u5f00 PhpStorm\uff0c\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684 &#8220;File&#8221; \u2192 &#8220;New&#8221; \u2192 &#8220;Project&#8230;&#8221;\u3002 \u5728 &#8220;New Project&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9 &#8220;Web Application&#8221; \u6a21\u677f\u5e76\u8f93\u5165\u9879\u76ee\u540d\u79f0\u548c\u8def\u5f84\u3002 \u9009\u62e9 PHP \u7248\u672c\u548c Web \u670d\u52a1\u5668\u7c7b\u578b\uff08\u5982 Apache \u6216 Nginx\uff09\uff0c\u7136\u540e\u70b9\u51fb &#8220;Create&#8221;\u3002 2. \u8bbe\u7f6e Web \u670d\u52a1\u5668 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5728 &#8220;Run&#8221; \u83dc\u5355\u4e2d\uff0c\u9009\u62e9 &#8220;Edit Configurations&#8230;&#8221;\u3002 \u5728 &#8220;Run\/Debug Configurations&#8221; \u5bf9\u8bdd\u6846\u4e2d\uff0c\u70b9\u51fb &#8220;+&#8221; \u6309\u94ae\u5e76\u9009\u62e9\u6240\u9700\u7684 Web \u670d\u52a1\u5668\u7c7b\u578b\u3002 \u914d\u7f6e Web \u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u5982\u7aef\u53e3\u53f7\u548c\u6587\u6863\u6839\u76ee\u5f55\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-21590","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21590","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=21590"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21590\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}