[請益] PHP執行exec沒有錯誤訊息,但執行失敗

看板Programming作者 (我 有我的倔強...)時間16年前 (2008/03/12 11:10), 編輯推噓1(103)
留言4則, 2人參與, 最新討論串1/1
請教版上的前輩 環境: 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

03/12 11:04,
而且相同的程式,我在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)

03/12 12:09, , 1F
有PHP版唷
03/12 12:09, 1F

03/12 12:09, , 2F
看一下escapeshellarg
03/12 12:09, 2F

03/12 12:10, , 3F
escapeshellcmd用法錯誤
03/12 12:10, 3F

03/12 12:31, , 4F
但是我在xp執行是正常的耶,請問是那裡有誤??
03/12 12:31, 4F
文章代碼(AID): #17rqcoya (Programming)