linux下用c程式執行檔案或url - Linux

Table of Contents

大家好,

try了很久,但網路上大多說用ShellExecute winAPI的

在linux底下沒辦法用

想問大家都如何用c程式執行url呢?

感謝!

Ex. 程式執行到一半 開啟ie http://www.google.com

windows下是用shellExecute做到
--

All Comments

John avatarJohn2009-08-31
#include <stdlib.h>
int main() {
system("ls");
return 0;
}
James avatarJames2009-09-04
不行,要看你用的Desktop Environment怎麼檔案關聯
Charlie avatarCharlie2009-09-06
阿,或是可以叫gnome-open去幫你開
Isabella avatarIsabella2009-09-08
最簡單就是用 system call 阿
Agatha avatarAgatha2009-09-12
例如一樓大大寫的那樣 就是一種system call的用法
Carolina Franco avatarCarolina Franco2009-09-14
system("firefox http://www.google.com"); 這樣囉
Valerie avatarValerie2009-09-18
也可以用curl哦 http://curl.haxx.se/