{"id":63531,"date":"2023-07-24T01:53:49","date_gmt":"2023-07-23T17:53:49","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=63531"},"modified":"2023-07-24T01:53:49","modified_gmt":"2023-07-23T17:53:49","slug":"peachpie-net-php","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/peachpie-net-php.html","title":{"rendered":"Peachpie\u5347\u7ea7\u4e86\uff0c\u4f53\u73b0PHP\u8de8\u5e73\u53f0\u4f18\u8d8a\u6027"},"content":{"rendered":"

\u5728\u5bf9 Peachpie \u7684\u7528\u6cd5\u8fdb\u884c\u4e86\u4e00\u4e9b\u5de5\u4f5c\u4e4b\u540e\uff0c\u73b0\u5728\u56de\u5230\u4e86\u5728\u7f16\u8bd1\u5668\u672c\u8eab\u5b9e\u73b0\u7684\u6838\u5fc3\u529f\u80fd\u3002\u76ee\u524d\u6b63\u5728\u66f4\u52a0\u63a5\u8fd1\u5b8c\u6210\u9879\u76ee\u7684\u201c\u521d\u8877\u201d \u2014 \u80fd\u591f\u8fd0\u884c\u5b8c\u6574\u7684\u73b0\u5b9e\u4e16\u754c\u7684\u5e94\u7528\u7a0b\u5e8f
\n\"\"<\/p>\n

PHP \u4f1a\u8bdd<\/strong><\/span><\/div>\n
<?php\r\nsession_start();               \/\/ this actually initializes $_SESSION from ISession service\r\necho $_SESSION['counter']++;  \/\/ here we change PHP session variable\r\nsession_commit();             \/\/ and this serializes $_SESSION back into ISession and saves the session object\r\n<\/pre>\n
\u8bc4\u4f30\u4ee3\u7801<\/strong><\/span><\/div>\n
<?php function main() \r\n{ \/\/; \/\/ g : Generator\r\n<\/pre>\n
VSCode \u6269\u5c55<\/strong><\/span><\/div>\n
\u5bf9\u56fe\u50cf\u548c GD2 \u7684\u5b9e\u9a8c\u6027\u652f\u6301<\/strong><\/span><\/div>\n
\n

\u00a0\u53d1\u5e03\u4e3b\u9875<\/a><\/p>\n

\n
\n

Peachpie \u662f\u4e00\u4e2a\u7528\u4e8e\u00a0.NET \u5e73\u53f0\u4e0a\u7684\u7684 PHP \u7f16\u8bd1\u5668\u548c\u8fd0\u884c\u65f6\u3002\u4f5c\u4e3a PHP \u8bed\u8a00\u7684\u5b8c\u5168\u91cd\u65b0\u5b9e\u73b0\uff0c\u5b83\u5141\u8bb8\u5b8c\u5168\u4f7f\u7528\u00a0.NET \u8fdb\u884c\u7f16\u5199\uff0c\u5e76\u5728 .NET Framework\u3001NET Core \u548c Mono \u4e0a\u8fd0\u884c PHP\u3002Peachpie \u53ef\u4ee5\u65e0\u7f1d\u5229\u7528 .NET \u5bf9\u8c61\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u4e5f\u53ef\u4ee5\u8ba9 C# \u4ee3\u7801\u76f4\u63a5\u8bbf\u95ee\u5df2\u7f16\u8bd1\u7684 PHP \u51fd\u6570\u3001\u53d8\u91cf\u548c\u7c7b\u3002<\/p>\n

Peachpie \u9879\u76ee\u7684\u76ee\u6807\u662f\u5c06 PHP \u4ee3\u7801\u5e93\u8fc1\u79fb\u81f3 .NET\uff0c\u4ece\u800c\u53ef\u901a\u8fc7\u5404\u81ea\u7684 API \u4e3a PHP \u63d0\u4f9b .NET \u548c ASP.NET \u8fd0\u884c\u65f6\u3002<\/p>\n<\/div>\n<\/div>\n

\n