{"id":3005,"date":"2023-08-16T18:38:57","date_gmt":"2023-08-16T10:38:57","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=3005"},"modified":"2023-08-16T18:38:57","modified_gmt":"2023-08-16T10:38:57","slug":"php%e7%94%9f%e6%88%90%e7%94%b5%e8%84%91app%e6%98%af%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/3005\/","title":{"rendered":"php\u751f\u6210\u7535\u8111app\u662f\u600e\u4e48\u5b9e\u73b0\u7684\uff1f"},"content":{"rendered":"

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 PHP \u751f\u6210\u7535\u8111\u5e94\u7528\uff08APP\uff09\u3002\u6211\u4eec\u5c06\u8ba8\u8bba\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u8bf7\u6ce8\u610f\uff0c\u867d\u7136 PHP \u662f\u4e00\u4e2a\u5f88\u597d\u7684 Web \u5f00\u53d1\u8bed\u8a00\uff0c\u4f46\u5b83\u5e76\u4e0d\u662f\u4e3a\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u8bbe\u8ba1\u7684\u3002\u7136\u800c\uff0c\u901a\u8fc7\u4f7f\u7528\u4e00\u4e9b\u6280\u5de7\u548c\u7b2c\u4e09\u65b9\u5e93\uff0c\u6211\u4eec\u4ecd\u7136\u53ef\u4ee5\u7528 PHP \u6784\u5efa\u684c\u9762\u5e94\u7528\u3002<\/p>\n

**\u539f\u7406**<\/p>\n

\u8981\u4f7f\u7528 PHP \u5f00\u53d1\u684c\u9762\u5e94\u7528\uff0c\u539f\u7406\u662f\u5229\u7528 PHP \u5185\u7f6e\u7684 Web \u670d\u52a1\u5668\u529f\u80fd\u5c06\u5e94\u7528\u7a0b\u5e8f\u4f5c\u4e3a Web \u9875\u9762\u8fd0\u884c\u3002\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5e94\u7528\u7a0b\u5e8f\u5305\u88c5\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u4e8c\u8fdb\u5236\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5982\u6b64\u4e00\u6765\uff0c\u7528\u6237\u65e0\u9700\u5b89\u88c5 PHP \u6216 Web \u670d\u52a1\u5668\u5373\u53ef\u8fd0\u884c\u8be5\u5e94\u7528\u3002<\/p>\n

\u5b9e\u73b0\u8fd9\u4e2a\u8fc7\u7a0b\u7684\u5173\u952e\u662f\u4f7f\u7528\u4e00\u4e2a\u9002\u7528\u4e8e\u6b64\u76ee\u7684\u7684\u6253\u5305\u5668\/\u7f16\u8bd1\u5668\u3002\u6709\u591a\u4e2a\u8fd9\u6837\u7684\u5de5\u5177\uff0c\u5176\u4e2d\u4e00\u4e2a\u53eb\u505a “PHP Desktop”\u3002<\/p>\n

**\u4f7f\u7528 PHP Desktop \u5f00\u53d1\u684c\u9762\u5e94\u7528\u7684\u6b65\u9aa4**<\/p>\n

1. \u5b89\u88c5 PHP Desktop\uff1a\u7f51\u7ad9\u751f\u6210app\u8f6f\u4ef6\u5728\u7ebf\u624b\u673a\u89c2\u770b<\/a>\u9996\u5148\uff0c\u60a8\u9700\u8981\u4ece PHP Desktop \u7684 Github \u4ed3\u5e93 (htt<\/p>\n

<\/figure>\n<\/p>\n

ps:\/\/github.com\/cztomczak\/phpdesktop) \u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684 PHP Desktop\uff0c\u8be5\u4ed3\u5e93\u63d0\u4f9b\u4e86 Windows \u548c MacOS \u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n

2. \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 PHP \u9879\u76ee\uff1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 PHP \u9879\u76ee\u6587\u4ef6\u5939\uff0c\u7136\u540e\u5728\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a “app” \u7684\u5b50\u6587\u4ef6\u5939\u3002\u8fd9\u5c06\u5305\u542b\u6240\u6709 PHP \u6587\u4ef6\u548c\u76f8\u5173\u8d44\u6e90\u3002<\/p>\n

3. \u5728 “app” \u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a “index.php” \u6587\u4ef6\uff1a\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f60\u53ef\u4ee5\u7f16\u5199\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u903b\u8f91\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u7b80\u5355\u7684 “Hello, World!” \u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5982\u6b64\u7f16\u5199\uff1a<\/p>\n

“`php<\/p>\n<\/p>\n

\n

\n

\u6211\u7684 PHP \u684c\u9762\u5e94\u7528<\/title><\/p>\n<\/p>\n<p>\n<p> <a href=\"http:\/\/www.yimenyun.cn\/app-shengcheng-232.html\">ios\u7f51\u9875\u751f\u6210app<\/a> echo “Hello, World!”;<\/p>\n<p> ?><\/p>\n<\/p>\n<p>“`<\/p>\n<p>4. \u914d\u7f6e PHP Desktop\uff1a\u89e3\u538b\u60a8\u5728\u7b2c\u4e00\u6b65\u4e0b\u8f7d\u7684 PHP Desktop \u6587\u4ef6\uff0c\u5c06 “phpdesktop”\uff08Windows\uff09\u6216 “phpdesktop.app”\uff08MacOS\uff09\u590d\u5236\u5230\u60a8\u7684 PHP \u9879\u76ee\u6587\u4ef6\u5939\u3002\u7136\u540e\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00 “settings.json” \u6587\u4ef6\uff0c\u8fd9\u662f PHP Desktop \u7684\u914d\u7f6e\u6587\u4ef6\u3002\u5c06 `”www_directory”` \u4fee\u6539\u4e3a\u6307\u5411\u60a8\u521a\u521a\u521b\u5efa\u7684 “app” \u6587\u4ef6\u5939\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<p>“`json<\/p>\n<p>{<\/p>\n<p> “title”: “\u6211\u7684 PHP \u684c\u9762\u5e94\u7528”,<\/p>\n<p> “www_directory”: “app”,<\/p>\n<p> \u2026<\/p>\n<p>}<\/p>\n<p>“`<\/p>\n<p>5. \u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\uff1a\u53cc\u51fb “phpdesktop” \u6216 “phpdesktop.app” \u53ef\u6267\u884c\u6587\u4ef6\uff0c\u6839\u636e\u60a8\u7684 PHP \u4ee3\u7801\u548c\u914d\u7f6e\u8bbe\u7f6e\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u770b\u5230\u4e00\u4e2a\u684c\u9762\u7a97\u53e3\u8fd0\u884c\u60a8\u7684 PHP \u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>6. \u6253\u5305\uff1a\u4e3a\u4e86\u5c06 PHP \u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u5206\u53d1\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\uff0c\u4f8b\u5982 Enigma Virtual Box (https:\/\/enigmaprotector.com\/en\/aboutvb.html) \u6216 Inno Setup (http:\/\/www.jrsoftware.org\/isinfo.php)\u3002\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5c06\u60a8\u7684\u5e94\u7528\u6587\u4ef6\u5939\u3001PHP Desktop \u53ef\u6267\u884c\u6587\u4ef6\u548c\u6240\u6709\u4f9d\u8d56\u9879\u6346\u7ed1\u5230\u4e00\u4e2a\u5355\u72ec\u7684\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\uff0c\u4f7f\u5f97\u60a8\u7684\u7528\u6237\u65e0\u9700\u5b89\u88c5\u4efb\u4f55\u989d\u5916\u8f6f\u4ef6\u5373\u53ef\u8f7b\u677e\u8fd0\u884c\u5e94\u7528\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u867d\u7136 PHP \u4e0d\u662f\u4e3a\u684c\u9762\u5e94\u7528\u8bbe\u8ba1\u7684\uff0c\u4f46\u901a\u8fc7\u5229\u7528 PHP Desktop \u7b49\u5de5\u5177\uff0c\u6211\u4eec\u4ecd\u7136\u53ef\u4ee5\u521b\u5efa\u72ec\u7acb\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002\u8fd9\u79cd\u65b9\u6cd5\u6700\u9002\u5408\u90a3\u4e9b\u719f\u6089 PHP \u7684 Web \u5f00\u53d1\u8005\uff0c\u5b83\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u5176 Web \u5f00\u53d1\u6280\u80fd\u5e94\u7528\u4e8e\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u3002\u7136\u800c\uff0c\u5bf9\u4e8e\u5bfb\u6c42\u5728\u6027\u80fd\u548c\u539f\u751f\u96c6\u6210\u65b9\u9762\u8fdb\u884c\u4f18\u5316\u7684\u7a0b\u5e8f\u5458\u6765\u8bf4\uff0c\u53ef\u80fd\u9700\u8981\u5bfb\u627e\u5176\u4ed6\u66f4\u9002\u7528\u4e8e\u684c\u9762\u5f00\u53d1\u7684\u8bed\u8a00\u548c\u6846\u67b6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 PHP \u751f\u6210\u7535\u8111\u5e94\u7528\uff08APP\uff09\u3002\u6211\u4eec\u5c06\u8ba8\u8bba\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u8bf7\u6ce8\u610f\uff0c\u867d\u7136 PHP \u662f\u4e00\u4e2a\u5f88\u597d\u7684 Web \u5f00\u53d1\u8bed\u8a00\uff0c\u4f46\u5b83\u5e76\u4e0d\u662f\u4e3a\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u8bbe\u8ba1\u7684\u3002\u7136\u800c\uff0c\u901a\u8fc7\u4f7f\u7528\u4e00\u4e9b\u6280<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[6139,12,16,3048,6138],"topic":[],"class_list":["post-3005","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-app","tag-12","tag-16","tag-3048"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=3005"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3005\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=3005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=3005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=3005"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=3005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}