使用 PHP COM class 打开我的电脑

Open MyComputer using PHP COM class

我正在尝试使用 COM class 打开 MyComputer ...你能帮我解决 COM class 中 MyComputer 的 name 吗? 例如,如果您想打开记事本,您可以这样做:

<?php
$shell = new COM("WScript.Shell");
$shell->Run("notepad.exe");
$shell = null; ?>

运行("notepad.exe");适用于记事本,但是当我使用 运行("mycomputer.exe"); 我遇到错误:

Fatal error: Uncaught exception 'com_exception' with message 'Source: Unknown
Description: Unknown' in E:\Localhost\root\test.php:3 Stack trace: #0 E:\Localhost\root\test.php(3): com->Run('computer.exe') #1 {main} thrown in E:\Localhost\root\test.php on line 3

亲爱的朋友们,我感谢你们的帮助<3

你可以试试:

<?php
$shell = new COM("WScript.Shell");
$shell->Run("explorer.exe ,");
$shell = null; ?>

当我们添加“,”时,它会打开我的电脑。