作者Uihc (我 有我的倔强...)
看板Programming
标题[请益] PHP执行exec没有错误讯息,但执行失败
时间Wed Mar 12 11:10:41 2008
请教版上的前辈
环境: win2003 + iis6 + php-5.2.4 + MySQL5
我想利用exec去执行一只小程式(*.exe),
$cmd="ptInRgn $shpfile $e_10 $n_10";
^^^^^^^ ^^^^^ ^^^^^ ^^^^^
程式名称 参数1 参数2 参数3
$getRgnID=exec(escapeshellcmd($cmd));
已经开给cmd.exe IIS guest 读取及执行权限
也确认php.ini里safe_mode是off的 也没有设定disable_funcions
但是却无法成功执行得到结果,在error log也没有任何讯息
(error_reporting设定为 E_ALL)
请问是不是win2003有什麽地方会挡住php去呼叫cmd.exe来执行程式
应该还要做什麽才能用exec来执行电脑里的.exe呢?
应该怎麽设定error_reporting才能得到执行失败的讯息呢??
谢谢
--
最近的新嗜好~部落格研究:
http://Qiu0.blogspot.com/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.64.235
1F:→ Uihc:而且相同的程式,我在xp执行完全没有问题.....╮(﹋﹏﹌)╭.. 03/12 11:04
--
最近的新嗜好~部落格研究:
http://Qiu0.blogspot.com/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.64.235
※ 编辑: Uihc 来自: 140.112.64.235 (03/12 11:11)
2F:推 buganini:有PHP版唷 140.122.126.12 03/12 12:09
3F:→ buganini:看一下escapeshellarg 140.122.126.12 03/12 12:09
4F:→ buganini:escapeshellcmd用法错误 140.122.126.12 03/12 12:10
5F:→ Uihc:但是我在xp执行是正常的耶,请问是那里有误?? 140.112.64.235 03/12 12:31