{"id":516,"date":"2022-12-20T13:05:46","date_gmt":"2022-12-20T04:05:46","guid":{"rendered":"https:\/\/kamita.net\/program\/?p=516"},"modified":"2022-12-20T13:05:46","modified_gmt":"2022-12-20T04:05:46","slug":"php%e3%81%ae%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%81%a7%e3%80%81windows%e3%81%ae%e9%80%9a%e7%9f%a5%e6%a9%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/kamita.net\/program\/?p=516","title":{"rendered":"php\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3001windows\u306e\u901a\u77e5\u6a5f\u80fd"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>PHP \u30b9\u30af\u30ea\u30d7\u30c8\u3067 Windows \u306e\u901a\u77e5\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol>\n<li>PHP \u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u3001Windows \u7528\u306e COM \u7d4c\u7531\u3067 Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">Copy code<code>$WshShell = new COM(\"WScript.Shell\");\n<\/code><\/pre>\n\n\n\n<ol start=\"2\">\n<li>\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u304b\u3089\u901a\u77e5\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">Copy code<code>$WshShell-&gt;Popup(\"This is a test notification from PHP.\", 0, \"Test Notification\", 0x0 + 0x40);\n<\/code><\/pre>\n\n\n\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u3001Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u304b\u3089 &#8220;This is a test notification from PHP.&#8221; \u3068\u3044\u3046\u30c6\u30ad\u30b9\u30c8\u3092\u542b\u3080\u901a\u77e5\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001PHP \u306e COM \u304a\u3088\u3073 Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p><strong>Popup(&#8220;This is a test notification from PHP.&#8221;, 0, &#8220;Test Notification&#8221;, 0x0 + 0x40); \u3067\u3059\u304c\u3001\u5f15\u6570\u306e\u610f\u5473<\/strong><\/p>\n\n\n\n<p><code>Popup<\/code> \u30e1\u30bd\u30c3\u30c9\u306f\u3001Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u304b\u3089\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u901a\u77e5\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6b21\u306e\u3088\u3046\u306a 4 \u3064\u306e\u5f15\u6570\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ol>\n<li><code>string text<\/code>: \u901a\u77e5\u306b\u8868\u793a\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u3002\u3053\u306e\u5f15\u6570\u306b\u306f\u3001\u901a\u77e5\u306b\u8868\u793a\u3057\u305f\u3044\u30c6\u30ad\u30b9\u30c8\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>int seconds<\/code>: \u901a\u77e5\u304c\u8868\u793a\u3055\u308c\u308b\u6642\u9593 (\u79d2)\u3002\u3053\u306e\u5f15\u6570\u306b\u306f\u3001\u901a\u77e5\u3092\u8868\u793a\u3059\u308b\u6642\u9593 (\u79d2) \u3092\u6574\u6570\u5024\u3068\u3057\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>string title<\/code>: \u901a\u77e5\u306e\u30bf\u30a4\u30c8\u30eb\u3002\u3053\u306e\u5f15\u6570\u306b\u306f\u3001\u901a\u77e5\u306b\u8868\u793a\u3059\u308b\u30bf\u30a4\u30c8\u30eb\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>int type<\/code>: \u901a\u77e5\u306e\u30bf\u30a4\u30d7\u3002\u3053\u306e\u5f15\u6570\u306b\u306f\u3001\u901a\u77e5\u306e\u30bf\u30a4\u30d7\u3092\u8868\u3059\u6574\u6570\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u6574\u6570\u5024\u306b\u306f\u30010x0\u30010x10\u30010x20\u30010x30\u30010x40\u30010x50\u30010x60\u3001\u304a\u3088\u3073 0x100 \u306e\u3044\u305a\u308c\u304b\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5b9f\u884c\u3057\u3066\u307f\u305f\u3089\u3001\u6b21\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308b\u5834\u5408\n Fatal error: Uncaught Error: Class \"COM\" not found in <code>\n<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u30a8\u30e9\u30fc\u306f\u3001PHP \u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067 Windows \u7528\u306e COM \u7d4c\u7531\u3067 Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u30a8\u30e9\u30fc\u3092\u89e3\u6c7a\u3059\u308b\u306b\u306f\u3001PHP \u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3001COM \u7d4c\u7531\u3067 Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>PHP \u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol>\n<li><code>php.ini<\/code> \u30d5\u30a1\u30a4\u30eb\u5185\u306b\u3001<code>extension=php_com_dotnet.dll<\/code> \u306e\u884c\u3092\u8ffd\u52a0\u3059\u308b<\/li>\n<\/ol>\n\n\n\n<p><code>php.ini<\/code> \u30d5\u30a1\u30a4\u30eb\u5185\u306b\u3001\u6b21\u306e\u3088\u3046\u306a\u884c\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3001COM \u7d4c\u7531\u3067 Windows \u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ol start=\"2\">\n<li>PHP \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b <code>php_com_dotnet.dll<\/code> \u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044<\/li>\n<\/ol>\n\n\n\n<p>PHP \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3001<code>php_com_dotnet.dll<\/code> \u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001PHP \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u518d\u5ea6\u884c\u3044\u3001\u3053\u306e DLL \u30d5\u30a1\u30a4\u30eb\u3092\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u30b9\u30af\u30ea\u30d7\u30c8\u3067 Windows \u306e\u901a\u77e5\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059 &hellip; <a href=\"https:\/\/kamita.net\/program\/?p=516\">Continued<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/kamita.net\/program\/index.php?rest_route=\/wp\/v2\/posts\/516"}],"collection":[{"href":"https:\/\/kamita.net\/program\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kamita.net\/program\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kamita.net\/program\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kamita.net\/program\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=516"}],"version-history":[{"count":1,"href":"https:\/\/kamita.net\/program\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":517,"href":"https:\/\/kamita.net\/program\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions\/517"}],"wp:attachment":[{"href":"https:\/\/kamita.net\/program\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kamita.net\/program\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kamita.net\/program\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}