{"id":20577,"date":"2024-11-19T14:18:53","date_gmt":"2024-11-19T06:18:53","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20577\/"},"modified":"2024-11-19T14:18:53","modified_gmt":"2024-11-19T06:18:53","slug":"sublime%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8cphp%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20577\/","title":{"rendered":"sublime\u600e\u4e48\u8fd0\u884cphp\u6587\u4ef6"},"content":{"rendered":"<blockquote><p>\n  \u4f7f\u7528 sublime text \u8fd0\u884c php \u6587\u4ef6\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5 php-cs-fixer \u63d2\u4ef6\uff0c\u914d\u7f6e php \u89e3\u91ca\u5668\u3002\u521b\u5efa\u4e00\u4e2a php \u6587\u4ef6\u3002\u9009\u62e9 &#8220;php &#8211; cli (build)&#8221; \u6784\u5efa\u7cfb\u7edf\u3002\u6309 &#8220;ctrl\/cmd&#8221; + &#8220;b&#8221; \u8fd0\u884c\u6587\u4ef6\u3002\u5728 &#8220;output&#8221; \u9762\u677f\u4e2d\u67e5\u770b\u6267\u884c\u7ed3\u679c\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040306301827014.jpg\" class=\"aligncenter\" title=\"sublime\u600e\u4e48\u8fd0\u884cphp\u6587\u4ef6\u63d2\u56fe\" alt=\"sublime\u600e\u4e48\u8fd0\u884cphp\u6587\u4ef6\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 Sublime Text \u8fd0\u884c PHP \u6587\u4ef6<\/strong><\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 PHP \u63d2\u4ef6<\/strong><\/p>\n<ul>\n<li>\u8bbf\u95ee [Package Control](https:\/\/packagecontrol.io\/) \u7f51\u7ad9\u3002<\/li>\n<li>\u8f93\u5165 &#8220;PHP-cs-fixer&#8221; \u5e76\u5b89\u88c5\u8be5\u63d2\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 2\uff1a\u914d\u7f6e PHP Interpreter<\/strong><\/p>\n<ul>\n<li>\u9009\u62e9 &#8220;View&#8221; &gt; &#8220;Command Palette&#8221;\u3002<\/li>\n<li>\u8f93\u5165 &#8220;PHP: Select PHP Interpreter&#8221;\u3002<\/li>\n<li>\u9009\u62e9\u5df2\u5b89\u88c5\u5728\u8ba1\u7b97\u673a\u4e0a\u7684 PHP \u7248\u672c\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 3\uff1a\u521b\u5efa PHP \u6587\u4ef6<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u5728 Sublime Text \u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u3002<\/li>\n<li>\u4ee5 &#8220;.php&#8221; \u4e3a\u6269\u5c55\u540d\u4fdd\u5b58\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 4\uff1a\u8fd0\u884c PHP \u6587\u4ef6<\/strong><\/p>\n<ul>\n<li>\u9009\u62e9 &#8220;Tools&#8221; &gt; &#8220;Build System&#8221; &gt; &#8220;PHP &#8211; CLI (Build)&#8221;\u3002<\/li>\n<li>\u6309\u5feb\u6377\u952e &#8220;Ctrl&#8221; + &#8220;B&#8221; (Windows\/Linux) \u6216 &#8220;Cmd&#8221; + &#8220;B&#8221; (macOS) \u8fd0\u884c PHP \u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 5\uff1a\u67e5\u770b\u8f93\u51fa<\/strong><\/p>\n<ul>\n<li>\u8f93\u51fa\u5c06\u663e\u793a\u5728 Sublime Text \u4e2d\u7684 &#8220;Output&#8221; \u9762\u677f\u4e2d\u3002<\/li>\n<li>\u5982\u679c\u8fd0\u884c\u6210\u529f\uff0c\u60a8\u5c06\u770b\u5230 PHP \u811a\u672c\u7684\u6267\u884c\u7ed3\u679c\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8fd0\u884cphp\u6587\u4ef6\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>\u4f7f\u7528 sublime text \u8fd0\u884c php \u6587\u4ef6\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5 php-cs-fixer \u63d2\u4ef6\uff0c\u914d\u7f6e php \u89e3\u91ca\u5668\u3002\u521b\u5efa\u4e00\u4e2a php \u6587\u4ef6\u3002\u9009\u62e9 &#8220;php &#8211; cli (build)&#8221; \u6784\u5efa\u7cfb\u7edf\u3002\u6309 &#8220;ctrl\/cmd&#8221; + &#8220;b&#8221; \u8fd0\u884c\u6587\u4ef6\u3002\u5728 &#8220;output&#8221; \u9762\u677f\u4e2d\u67e5\u770b\u6267\u884c\u7ed3\u679c\u3002 \u5982\u4f55\u4f7f\u7528 Sublime Text \u8fd0\u884c PHP \u6587\u4ef6 \u6b65\u9aa4 1\uff1a\u5b89\u88c5 PHP \u63d2\u4ef6 \u8bbf\u95ee [Package Control](https:\/\/packagecontrol.io\/) \u7f51\u7ad9\u3002 \u8f93\u5165 &#8220;PHP-cs-fixer&#8221; \u5e76\u5b89\u88c5\u8be5\u63d2\u4ef6\u3002 \u6b65\u9aa4 2\uff1a\u914d\u7f6e PHP Interpreter \u9009\u62e9 &#8220;View&#8221; &gt; &#8220;Command Palette&#8221;\u3002 \u8f93\u5165 &#8220;PHP: Select PHP Interpreter&#8221;\u3002 \u9009\u62e9\u5df2\u5b89\u88c5\u5728\u8ba1\u7b97\u673a\u4e0a\u7684 [&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-20577","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20577","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=20577"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20577\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}