簡體   English   中英

在Android設備上“打開”網站

[英]“opening” a website in android device

我只想在我的網站上執行php代碼,該代碼向文件中寫入內容。 是否有用於android開發的簡單解決方案?

假設您想通過Android手機觸發服務器上某個php腳本的執行:

String url = "http://whatever.com/script.php?argument=value";
HttpClient client = new DefaultHttpClient();

try {
    client.execute(new HttpGet(url));
} catch(IOException e) {
    // something happened
}

嘗試這個:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.helllo.com"));
startActivity(browserIntent);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM