2012-01-03 2 views
2

나는 일주일 전에 다음과 같이 해보려고 독해 중이다. PHP를 사용하여 Bugzilla API를 사용하여 새로운 버그를 만들고 싶습니다. API가 있으므로 문제를 해결하고 싶지는 않지만 API를 사용하여 로그인 할 수 없습니다.Bugzilla 로그인하여 버그를 작성하십시오.

내가 CodeIgniter의 FW를 사용하고 내가 검색 및 읽기의 긴 일 후에이 발견 :

public function tryBugZilla() 
{ 
    $this->load->library('xmlrpc'); 
    $this->xmlrpc->server('http://link/xmlrpc.cgi', 80); 
    $this->xmlrpc->method('User.login'); 

    $request = array('Bugzilla_login'=>'login', 'Bugzilla_password'=>'pass', 'product'=>'Your Product Name', 'component'=>'User Submitted', 'summary'=>'Test', 'version'=>'x.x', 'description'=>'asdas'); 

    $this->xmlrpc->method('Bug.create'); 
    $this->xmlrpc->request(array(array($request, 'struct')),'struct'); 

    if(!$this->xmlrpc->send_request()) { 
     echo $this->xmlrpc->display_error(); 
    } 

    // this returns ticket ID 
    print_r($this->xmlrpc->display_response()); 
    //i get this: 
    // No data received from server 

} 

이는 소스에게 있습니다 of the code

내 질라 버전은 4.0.2

입니다 PHP를 사용하여 Bugzilla REST API를 어떻게 사용할 수 있습니까? 로그인 만하면됩니다.

+0

당신이 어떤 오류를받을 수 있나요? – ceejayoz

+0

서버에서 데이터를받지 못했습니다. – Sedz

+0

Bugzilla.version과 같은 간단한 방법을 사용해 보셨습니까? –

답변

관련 문제