{"id":54119,"date":"2024-10-09T16:59:15","date_gmt":"2024-10-09T08:59:15","guid":{"rendered":"https:\/\/server.hk\/cnblog\/54119\/"},"modified":"2024-10-09T16:59:15","modified_gmt":"2024-10-09T08:59:15","slug":"windows-server-2019-%e5%ae%89%e8%a3%9d-php","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/54119\/","title":{"rendered":"Windows Server 2019 \u5b89\u88dd PHP"},"content":{"rendered":"<h1 id=\"windows-server-2019-%e5%ae%89%e8%a3%9d-php-mkOokpdrfW\">Windows Server 2019 \u5b89\u88dd PHP<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0cPHP \u662f\u4e00\u7a2e\u5ee3\u6cdb\u4f7f\u7528\u7684\u4f3a\u670d\u5668\u7aef\u8173\u672c\u8a9e\u8a00\uff0c\u7279\u5225\u9069\u5408\u65bc\u7db2\u9801\u958b\u767c\u3002\u5c0d\u65bc\u4f7f\u7528 Windows Server 2019 \u7684\u7528\u6236\u4f86\u8aaa\uff0c\u5b89\u88dd PHP \u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\u3002\u672c\u6587\u5c07\u8a73\u7d30\u4ecb\u7d39\u5982\u4f55\u5728 Windows Server 2019 \u4e0a\u5b89\u88dd PHP\uff0c\u4e26\u914d\u7f6e\u5176\u8207 IIS\uff08Internet Information Services\uff09\u7684\u6574\u5408\u3002<\/p>\n<h2 id=\"%e5%89%8d%e6%9c%9f%e6%ba%96%e5%82%99-mkOokpdrfW\">\u524d\u671f\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd\u4e4b\u524d\uff0c\u8acb\u78ba\u4fdd\u60a8\u7684 Windows Server 2019 \u5df2\u7d93\u5b89\u88dd\u4e86 IIS\u3002\u60a8\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u6b65\u9a5f\u4f86\u6aa2\u67e5\u548c\u5b89\u88dd IIS\uff1a<\/p>\n<ol>\n<li>\u6253\u958b\u300c\u4f3a\u670d\u5668\u7ba1\u7406\u54e1\u300d\u3002<\/li>\n<li>\u9078\u64c7\u300c\u7ba1\u7406\u300d&gt;\u300c\u6dfb\u52a0\u89d2\u8272\u548c\u529f\u80fd\u300d\u3002<\/li>\n<li>\u5728\u300c\u89d2\u8272\u300d\u9078\u64c7\u9801\u9762\u4e2d\uff0c\u52fe\u9078\u300cWeb \u4f3a\u670d\u5668 (IIS)\u300d\u3002<\/li>\n<li>\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5b89\u88dd\u3002 <\/li>\n<\/ol>\n<h2 id=\"%e4%b8%8b%e8%bc%89-php-mkOokpdrfW\">\u4e0b\u8f09 PHP<\/h2>\n<p>\u63a5\u4e0b\u4f86\uff0c\u60a8\u9700\u8981\u5f9e PHP \u7684\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09\u9069\u5408 Windows \u7684 PHP \u7248\u672c\u3002\u5efa\u8b70\u4e0b\u8f09\u6700\u65b0\u7684\u7a69\u5b9a\u7248\u672c\uff0c\u4e26\u9078\u64c7\u300cThread Safe\u300d\u7248\u672c\uff0c\u56e0\u70ba\u5b83\u66f4\u9069\u5408\u8207 IIS \u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d-php-mkOokpdrfW\">\u5b89\u88dd PHP<\/h2>\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u8acb\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\u5b89\u88dd\uff1a<\/p>\n<ol>\n<li>\u5c07\u4e0b\u8f09\u7684 PHP \u58d3\u7e2e\u5305\u89e3\u58d3\u5230\u60a8\u5e0c\u671b\u5b89\u88dd\u7684\u76ee\u9304\uff0c\u4f8b\u5982 C:PHP\u3002<\/li>\n<li>\u5728\u8a72\u76ee\u9304\u4e2d\uff0c\u627e\u5230 php.ini-development \u6587\u4ef6\uff0c\u5c07\u5176\u8907\u88fd\u4e26\u91cd\u547d\u540d\u70ba php.ini\u3002<\/li>\n<li>\u6253\u958b php.ini \u6587\u4ef6\uff0c\u6839\u64da\u9700\u8981\u9032\u884c\u914d\u7f6e\uff0c\u4f8b\u5982\u555f\u7528\u64f4\u5c55\u6a21\u7d44\u3002<\/li>\n<\/ol>\n<h2 id=\"%e9%85%8d%e7%bd%ae-iis-mkOokpdrfW\">\u914d\u7f6e IIS<\/h2>\n<p>\u70ba\u4e86\u8b93 IIS \u80fd\u5920\u8655\u7406 PHP \u6587\u4ef6\uff0c\u60a8\u9700\u8981\u9032\u884c\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n<ol>\n<li>\u6253\u958b\u300cIIS \u7ba1\u7406\u5668\u300d\u3002<\/li>\n<li>\u5728\u5de6\u5074\u7684\u9023\u63a5\u9762\u677f\u4e2d\uff0c\u9078\u64c7\u60a8\u7684\u4f3a\u670d\u5668\u7bc0\u9ede\u3002<\/li>\n<li>\u5728\u4e2d\u9593\u7684\u529f\u80fd\u9762\u677f\u4e2d\uff0c\u627e\u5230\u300c\u8655\u7406\u7a0b\u5e8f\u6620\u5c04\u300d\u3002<\/li>\n<li>\u5728\u53f3\u5074\u7684\u64cd\u4f5c\u9762\u677f\u4e2d\uff0c\u9078\u64c7\u300c\u6dfb\u52a0\u6a21\u7d44\u6620\u5c04\u300d\u3002<\/li>\n<li>\u5728\u5f48\u51fa\u7684\u5c0d\u8a71\u6846\u4e2d\uff0c\u586b\u5beb\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/li>\n<ul>\n<li>\u8acb\u6c42\u8def\u5f91\uff1a<code>*.php<\/code><\/li>\n<li>\u6a21\u7d44\uff1a<code>FastCgiModule<\/code><\/li>\n<li>\u57f7\u884c\u6a94\uff1a<code>C:PHPphp-cgi.exe<\/code><\/li>\n<\/li>\n<li>\u540d\u7a31\uff1a<code>PHP_via_FastCGI<\/code><\/li>\n<\/ul>\n<li>\u9ede\u64ca\u300c\u78ba\u5b9a\u300d\uff0c\u7136\u5f8c\u5728\u63d0\u793a\u4e2d\u9078\u64c7\u300c\u662f\u300d\u4ee5\u5275\u5efa FastCGI \u8a2d\u5b9a\u3002<\/li>\n<\/ol>\n<h2 id=\"%e6%b8%ac%e8%a9%a6-php-%e5%ae%89%e8%a3%9d-mkOokpdrfW\">\u6e2c\u8a66 PHP \u5b89\u88dd<\/h2>\n<p>\u70ba\u4e86\u78ba\u8a8d PHP \u662f\u5426\u5b89\u88dd\u6210\u529f\uff0c\u60a8\u53ef\u4ee5\u5275\u5efa\u4e00\u500b\u7c21\u55ae\u7684 PHP \u6e2c\u8a66\u6587\u4ef6\uff1a<\/p>\n<ol>\n<li>\u5728 IIS \u7684\u7db2\u7ad9\u6839\u76ee\u9304\u4e2d\uff08\u4f8b\u5982 C:inetpubwwwroot\uff09\uff0c\u5275\u5efa\u4e00\u500b\u540d\u70ba <code>info.php<\/code> \u7684\u6587\u4ef6\u3002<\/li>\n<li>\u5728\u8a72\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u78bc\uff1a<\/li>\n<pre><code>&lt;?php\nphpinfo();\n?&gt;<\/code><\/pre>\n<li>\u5728\u700f\u89bd\u5668\u4e2d\u8a2a\u554f <code>http:\/\/localhost\/info.php<\/code>\uff0c\u5982\u679c\u770b\u5230 PHP \u4fe1\u606f\u9801\u9762\uff0c\u5247\u8868\u793a\u5b89\u88dd\u6210\u529f\u3002<\/li>\n<\/ol>\n<h2 id=\"%e7%b8%bd%e7%b5%90-mkOokpdrfW\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Windows Server 2019 \u4e0a\u5b89\u88dd PHP \u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\uff0c\u53ea\u9700\u5e7e\u500b\u6b65\u9a5f\u5373\u53ef\u5b8c\u6210\u3002\u901a\u904e\u6b63\u78ba\u7684\u914d\u7f6e\uff0c\u60a8\u53ef\u4ee5\u5145\u5206\u5229\u7528 PHP \u7684\u5f37\u5927\u529f\u80fd\u4f86\u958b\u767c\u548c\u904b\u884c\u5404\u7a2e\u7db2\u9801\u61c9\u7528\u7a0b\u5e8f\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u4f86\u63d0\u5347\u60a8\u7684\u7db2\u7ad9\u6027\u80fd\u548c\u7a69\u5b9a\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to install PHP on Windows Server 2019 with step-by-step instructions for seamless web development and server management.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-54119","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=54119"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54119\/revisions"}],"predecessor-version":[{"id":54120,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54119\/revisions\/54120"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=54119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=54119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=54119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}