XML-RPC无法工作并在Bugzilla中使用函数用法

时间:2012-09-29 18:14:39

标签: php xml xml-parsing bugzilla

我正在编写一个程序来从bug中提取注释。所以首先使用XML-RPC我试图连接到Bugzilla并通过

进行

http://bugzilla.yourdomainname.com/xmlrcp.cgi

所以这是我的代码......

setCookieJar();
    $oClient->setHttpClient($oHttpClient);

    $aResponse = $oClient->call('User.login', array(array(
    'login'=>'username',
    'password' => 'password',
        'remember' => 1
    )));
    //Log into bugzilla.


    function getInfoBug(int $bugno)
    {
    $aResponse = $oClient->call('Bug.get($bugno)');
    //this would just return bug no.
    $aResponse = $oClient->call('Bug.get( ids => [$bugno], include_fields => [\'id\', \'comments\'] )');
    //Getting info about bugs.
    $final = $Client->call('Bug.get(comments($aResponse)');
    //
    return $final;
   }

    $bug = 1379;

    echo $answer = getInfoBug($bug);
?>

所以实际上我不确定我是否正在从Buzilla API正确调用该函数,而另一个问题是

  

警告:require_once(Zend / Loader / Autoloader.php)[function.require-once]:无法打开流:C:\ Zend \ Apache2 \ htdocs \ Aakash \ bugzilla.php中没有这样的文件或目录6

     

致命错误:require_once()[function.require]:在C:\ Zend中打开所需的'Zend / Loader / Autoloader.php'(include_path ='/ usr / share / php / libzend-framework-php')失败第6行的Apache2 \ htdocs \ Aakash \ bugzilla.php

所以我不确定发生了什么。我只是PHP的初学者。

1 个答案:

答案 0 :(得分:0)

检查PHP include目录中是否存在Zend / Loader / Autoloader.php,以及为运行PHP脚本的用户正确设置权限。