Android HttpPost获得403 Forbidden

时间:2013-07-08 07:44:18

标签: android html http-post androidhttpclient

PHP curl请求从服务器中检索数据以获得正确的响应。

但是当我从Android调用HttpPost时,它会返回此错误:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /service/v2/rest.php
on this server.</p>
<hr>
<address>Apache/2.2.0 (Fedora) mod_fcgid/2.3.6 PHP/5.2.17 mod_python/3.3.1 Python/2.4.3     
mod_perl/2.0.4 Perl/v5.8.8 Server at nl.wooning.cz Port 80</address>
</body></html>

请帮帮我。

提前致谢... !!!

2 个答案:

答案 0 :(得分:0)

您需要在.htaccess中提供权限。请检查并提供相应的权限。有关详细信息,请参阅this

答案 1 :(得分:0)

您是否在清单文件中使用此权限

 <uses-permission android:name="android.permission.INTERNET" />
相关问题