可能重複:
php How do I start an external program running - Having trouble with system and exec如何使用PHP啓動Windows GUI程序?
如何打開exe文件用PHP?
我有這個想法,並且很難成功幾年,但最終失敗了。任何人告訴我一個成功的方法來完成這項工作?
<?php
if(isset($_POST['file_path'])){
/* -------
using "notepad++.exe" to open "test.php" file.
or run a bat file which calling "notepad++.exe" to open "test.php" file.
how to seting php.ini or firefox or any setting to do this job.
it is only for conveniently developing web page in my PC ,not for web servers
------- */
}
?>
<form action="test.php" method="post">
<input type="text" name="file_path" value="test.php"/>
<button type="submit">open with notepad++</button>
</form>
這將產生類似:
Check-out'exec':http://us3.php.net/manual/en/function.exec.php – Jasper
exec('notepad ++。exe test.php')'? – raina77ow
此外,至少在Windows上,通過IIS或Apache *啓動的PHP應用程序不能*啓動桌面應用程序沒有一些顯着的權限更改... – Charles