[英]“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.