我想启动一个 bat 文件或 exe
我试过
system("C:\\PATH\\TO\\FOLDER\\script.bat")
system("CMD.EXE C:\\PATH\\TO\\FOLDER\\script.bat")
system("C:\\PATH\\TO\\FOLDER\\exefile.exe /S nameOfFileToCreate.txt")
system("CMD.EXE C:\\PATH\\TO\\FOLDER\\exefile.exe /S nameOfFileToCreate.txt")
system("START C:\\PATH\\TO\\FOLDER\\script.bat")
system("START C:\\PATH\\TO\\FOLDER\\exefile.exe /S nameOfFileToCreate.txt")
使用 START,我收到此错误消息。其他尝试导致页面永远加载!
Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> WshShell.Exec<br/><b>Description:</b> The system cannot find the file specified. ' in C:\xampp\htdocs\upload.php:95 Stack trace: #0 C:\xampp\htdocs\upload.php(95): com->Exec('START C:\PROGRA...') #1 {main} thrown in C:\xampp\htdocs\upload.php on line 95