分享至
客戶有一個用C++寫得解碼演算法,也就是輸入某串字串之後會給傳回另一串字串 他們希望可以透過網站input給C++然後回傳結果回網頁 請問這有辦法作到嗎?
已邀請的邦友 {{ invite_list.length }}/5
假設, 那隻code 叫 abc
<? exec("/path/abc param", $output); print_r($output); ?> 看一下 $output 的樣子吧.... 它應該是一個 Array, 這樣知道怎麼取值了嗎?!
試試看 System program execution 手冊
http://tw2.php.net/exec
用這個指令 string shell_exec ( string $cmd )
這樣可以取得他秀出的訊息嗎?
IT邦幫忙