2013-07-08 52 views
0

PHP curl請求從服務器獲取響應的權限。Android HttpPost獲取403 Forbidden

但是,當我從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> 

請幫助我。

在此先感謝... !!!

+1

也許你需要登錄後纔可以訪問PHP文件... – RvdK

+0

當我調用從PHP的API工作正常,沒有問題,在PHP捲曲的請求。 在HttpPost android調用中出現錯誤。 – John

回答

0

您需要在.htaccess中提供權限。請相應地檢查並提供權限。有關更多信息,請參閱this

+0

您可以讓我知道,我必須在.htaccess文件中授予哪種類型的權限。 謝謝。 – John

+0

請參閱此鏈接可能會幫助您--http://www.techieshelp.com/you-don%E2%80%99t-have-permission-to-access-wp-adminpost-php-on-this-server/ – KOTIOS

0

您是否使用此權限清單檔案中的

​​
+0

是...它具有互聯網許可。 這個應用程序正在其他服務器上工作,但不幸的是沒有在我的另一臺服務器上工作。 – John