{"id":21584,"date":"2024-11-19T16:38:11","date_gmt":"2024-11-19T08:38:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21584\/"},"modified":"2024-11-19T16:38:11","modified_gmt":"2024-11-19T08:38:11","slug":"phpstorm%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8cphp%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21584\/","title":{"rendered":"phpstorm\u600e\u4e48\u8fd0\u884cphp\u9879\u76ee"},"content":{"rendered":"<blockquote><p>\n  \u8981\u5728 phpstorm \u4e2d\u8fd0\u884c php \u9879\u76ee\uff0c\u9700\u8981\uff1a1. \u521b\u5efa\u4e00\u4e2a php \u9879\u76ee\uff1b2. \u914d\u7f6e php \u89e3\u91ca\u5668\uff1b3. \u521b\u5efa\u5165\u53e3\u811a\u672c\uff1b4. \u914d\u7f6e\u8fd0\u884c\u914d\u7f6e\uff1b5. \u8fd0\u884c\u9879\u76ee\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/05\/2024060500271645679.jpg\" class=\"aligncenter\" title=\"phpstorm\u600e\u4e48\u8fd0\u884cphp\u9879\u76ee\u63d2\u56fe\" alt=\"phpstorm\u600e\u4e48\u8fd0\u884cphp\u9879\u76ee\u63d2\u56fe\" \/><\/p>\n<h2>\u5982\u4f55\u4f7f\u7528 PhpStorm \u8fd0\u884c PHP \u9879\u76ee<\/h2>\n<h3>Step 1\uff1a\u521b\u5efa PHP \u9879\u76ee<\/h3>\n<p>\u5728 PhpStorm \u4e2d\uff0c\u70b9\u51fb\u201cFile\u201d&gt;\u201cNew Project\u201d\u3002\u9009\u62e9\u201cPHP\u201d\u5e76\u6307\u5b9a\u9879\u76ee\u540d\u79f0\u548c\u4f4d\u7f6e\u3002<\/p>\n<h3>Step 2\uff1a\u914d\u7f6e PHP \u89e3\u91ca\u5668<\/h3>\n<p>\u5728\u9879\u76ee\u89c6\u56fe\u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u9879\u76ee\u540d\u79f0\u5e76\u9009\u62e9\u201cPHP Interpreter\u201d\u3002\u9009\u62e9\u8981\u7528\u4e8e\u9879\u76ee\u7684 PHP \u7248\u672c\u3002<\/p>\n<h3>Step 3\uff1a\u521b\u5efa\u5165\u53e3\u811a\u672c<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a PHP \u6587\u4ef6\uff0c\u4f8b\u5982 index.php\uff0c\u4f5c\u4e3a\u9879\u76ee\u7684\u5165\u53e3\u70b9\u3002\u8be5\u6587\u4ef6\u5e94\u5305\u542b\u60a8\u7684 PHP \u4ee3\u7801\u3002<\/p>\n<h3>Step 4\uff1a\u914d\u7f6e\u8fd0\u884c\u914d\u7f6e<\/h3>\n<p>\u5728\u5de5\u5177\u680f\u4e0a\uff0c\u6253\u5f00\u201cRun\u201d\u83dc\u5355\u3002\u9009\u62e9\u201cEdit Configurations\u201d\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u5728\u201cPHP Script\u201d\u9009\u9879\u5361\u4e2d\uff1a<\/p>\n<ul>\n<li>\u5c06\u201cScript\u201d\u5b57\u6bb5\u8bbe\u7f6e\u4e3a\u5165\u53e3\u811a\u672c\u7684\u6587\u4ef6\u8def\u5f84\u3002<\/li>\n<li>\u8bbe\u7f6e\u201cServer\u201d\u5b57\u6bb5\uff08\u53ef\u9009\uff09\uff1a\u9009\u62e9\u8981\u7528\u4e8e\u8fd0\u884c\u9879\u76ee\u7684 Web \u670d\u52a1\u5668\uff08\u4f8b\u5982 Nginx \u6216 Apache\uff09\u3002<\/li>\n<\/ul>\n<h3>Step 5\uff1a\u8fd0\u884c\u9879\u76ee<\/h3>\n<ul>\n<li>\u8981\u4ece IDE \u8fd0\u884c\u9879\u76ee\uff0c\u8bf7\u70b9\u51fb\u5de5\u5177\u680f\u4e0a\u7684\u201cRun\u201d\uff08\u7eff\u8272\u4e09\u89d2\u5f62\uff09\u6309\u94ae\u3002<\/li>\n<li>\u8981\u4ece\u547d\u4ee4\u884c\u8fd0\u884c\u9879\u76ee\uff0c\u8bf7\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230\u9879\u76ee\u76ee\u5f55\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ul>\n<pre>php index.php<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u60a8\u5df2\u6b63\u786e\u914d\u7f6e PHP \u89e3\u91ca\u5668\uff0c\u5e76\u4e14\u5165\u53e3\u811a\u672c\u4e2d\u6ca1\u6709\u8bed\u6cd5\u9519\u8bef\u3002<\/li>\n<li>\u5982\u679c\u60a8\u4f7f\u7528 Web \u670d\u52a1\u5668\uff0c\u8bf7\u786e\u4fdd\u5b83\u5df2\u914d\u7f6e\u4e3a\u81ea\u52a8\u52a0\u8f7d\u7d22\u5f15\u811a\u672c\u3002<\/li>\n<li>\u60a8\u53ef\u4ee5\u4f7f\u7528 IDE \u7684\u8c03\u8bd5\u5668\u6765\u8c03\u8bd5 PHP \u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8fd0\u884cphp\u9879\u76ee\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>\u8981\u5728 phpstorm \u4e2d\u8fd0\u884c php \u9879\u76ee\uff0c\u9700\u8981\uff1a1. \u521b\u5efa\u4e00\u4e2a php \u9879\u76ee\uff1b2. \u914d\u7f6e php \u89e3\u91ca\u5668\uff1b3. \u521b\u5efa\u5165\u53e3\u811a\u672c\uff1b4. \u914d\u7f6e\u8fd0\u884c\u914d\u7f6e\uff1b5. \u8fd0\u884c\u9879\u76ee\u3002 \u5982\u4f55\u4f7f\u7528 PhpStorm \u8fd0\u884c PHP \u9879\u76ee Step 1\uff1a\u521b\u5efa PHP \u9879\u76ee \u5728 PhpStorm \u4e2d\uff0c\u70b9\u51fb\u201cFile\u201d&gt;\u201cNew Project\u201d\u3002\u9009\u62e9\u201cPHP\u201d\u5e76\u6307\u5b9a\u9879\u76ee\u540d\u79f0\u548c\u4f4d\u7f6e\u3002 Step 2\uff1a\u914d\u7f6e PHP \u89e3\u91ca\u5668 \u5728\u9879\u76ee\u89c6\u56fe\u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u9879\u76ee\u540d\u79f0\u5e76\u9009\u62e9\u201cPHP Interpreter\u201d\u3002\u9009\u62e9\u8981\u7528\u4e8e\u9879\u76ee\u7684 PHP \u7248\u672c\u3002 Step 3\uff1a\u521b\u5efa\u5165\u53e3\u811a\u672c \u521b\u5efa\u4e00\u4e2a PHP \u6587\u4ef6\uff0c\u4f8b\u5982 index.php\uff0c\u4f5c\u4e3a\u9879\u76ee\u7684\u5165\u53e3\u70b9\u3002\u8be5\u6587\u4ef6\u5e94\u5305\u542b\u60a8\u7684 PHP \u4ee3\u7801\u3002 Step 4\uff1a\u914d\u7f6e\u8fd0\u884c\u914d\u7f6e \u5728\u5de5\u5177\u680f\u4e0a\uff0c\u6253\u5f00\u201cRun\u201d\u83dc\u5355\u3002\u9009\u62e9\u201cEdit Configurations\u201d\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5728\u201cPHP Script\u201d\u9009\u9879\u5361\u4e2d\uff1a \u5c06\u201cScript\u201d\u5b57\u6bb5\u8bbe\u7f6e\u4e3a\u5165\u53e3\u811a\u672c\u7684\u6587\u4ef6\u8def\u5f84\u3002 \u8bbe\u7f6e\u201cServer\u201d\u5b57\u6bb5\uff08\u53ef\u9009\uff09\uff1a\u9009\u62e9\u8981\u7528\u4e8e\u8fd0\u884c\u9879\u76ee\u7684 Web \u670d\u52a1\u5668\uff08\u4f8b\u5982 Nginx [&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-21584","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21584","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=21584"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21584\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}