2

PHP 経由で bugzilla インストールからすべての新しいバグのリストを取得することは可能ですか? xmlrpc.cgi ファイルがあることはわかりますが、使用方法の例が見つかりません

どんな助けでも感謝します ありがとう!

4

3 に答える 3

4

Zend_Http_Clientでそれを行う方法の例。生のPHPでもそれを行うことができます。http://petehowe.co.uk/2010/02/23/example-of-calling-the-bugzilla-api-using-php-zend-framework/

于 2011-01-10T13:58:16.783 に答える
2

私は実際に、生のXMLを取得できることを理解しました...

/buglist.cgi?ctype=atom&bug_status=NEW
于 2011-01-10T14:04:33.157 に答える
2

これはあなたが探しているものですか、XMLRPC Bugzilla

XMLRPC 呼び出しの例:

<?php
// Add the Zend Library, make sure this is installed: sudo apt-get install libzend-framework-php
ini_set("include_path", "/usr/share/php/libzend-framework-php");

// Add the AutoLoader, Calls any Library that's needed
require_once('Zend/Loader/Autoloader.php');
Zend_Loader_Autoloader::getInstance();

// New client that calls your Bugzilla XMLRPC server
$server = new Zend_XmlRpc_Client('http://bugzilla.yourdomain.com/xmlrpc.cgi');
$client = $server->getProxy(); 

// Create the Multi-Call array request
$request = array(
    array(
        'methodName' => 'system.listMethods', 
        'params'     => array() 
    )); 

/*
// Example: Multi call array format
$request = array(
    array(
        'methodName' => 'system.listMethods', 
        'params'     => array() 
    ),
    array(
        'methodName' => 'your_service.your_function', 
        'params'     => array('parm') 
    )); 

*/

// $response is an array() 
$response = $client->system->multicall($request); 

// Print the array
echo print_r($response,true);

?>
于 2011-01-10T15:31:12.583 に答える