私がここでやりたかったのは、ブラウザからサーバー上のexeファイルを開くことでした。 は私が答えで見つかった以下のPHPコードを使用してそれを行うために管理:
shell_exec('SCHTASKS /F /Create /TN _notepad /TR "notepad.exe" /SC DAILY /RU INTERACTIVE');
shell_exec('SCHTASKS /RUN /TN "_notepad"');
shell_exec('SCHTASKS /DELETE /TN "_notepad" /F');
これは、サーバー上でメモ帳を開きます。あなたは、Windows 8.1、Windowsの10およびWindows 2012 Serverのために働いたこのnotepad.exeを であなたのexeファイルへのパスを置き換えることができます
また、デスクトップアプリケーションを実行するためにApacheサービスを有効にする手順を以下試すことができます。
Start->Run, type "services.msc" to bring up Services control (other ways to get there, this is easiest IMO)
Locate your Apache service (mine was called "wampapache" using WampServer 2.0)
Open the service properties (double-click or right click->properties)
Flip to the Log On account and ensure the checkbox titled "Allow service to interact with Desktop" is checked
Flip back to the General tab, stop the service, start the service
を
解決策のために私が追ってきた質問へのリンクは次のとおりです。php How do I start an external program running - Having trouble with system and exec
他人に役立つことを願っています。
フルパスで実行しようとしましたか? C:\\ WINDOWS \\ system32 \\ notepad.exeなどです。 これを参照してくださいhttp://stackoverflow.com/questions/16037024/why-cannot-run-an-executable-file-with-exec-or-system-functions –
@Azaelはい私はそれを試みましたが、同じ結果 –