我正在尝试使用Xmlapi,但是首先我什么也没得到,调试代码后出现错误“ HTTP错误404”。我怎么能摆脱这个。我目前在codeigniter中使用此API。
以下是我的代码:-
require("xmlapi.php");
$xmlapi = new xmlapi("domain");
$xmlapi->set_port( 2083 );
$xmlapi->password_auth($opts['user'],$opts['pass']);
$xmlapi->set_debug(0);
$cpaneluser=$opts['user'];
$databasename="dbName";
$databaseuser="dbUser";
$databasepass='dbPassword';
$createdb = $xmlapi->api1_query($cpaneluser, "Mysql", "adddb", array($databasename));
$usr = $xmlapi->api1_query($cpaneluser, "Mysql", "adduser", array($databaseuser, $databasepass));
$addusr = $xmlapi->api1_query($cpaneluser, "Mysql", "adduserdb", array("".$cpaneluser."_".$databasename."", "".$cpaneluser."_".$databaseuser."", 'all'));