看板 Programming 關於我們 聯絡資訊
請教版上的前輩 環境: 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
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)
buganini:有PHP版唷 140.122.126.12 03/12 12:09
buganini:看一下escapeshellarg 140.122.126.12 03/12 12:09
buganini:escapeshellcmd用法錯誤 140.122.126.12 03/12 12:10
Uihc:但是我在xp執行是正常的耶,請問是那裡有誤?? 140.112.64.235 03/12 12:31