0

我想使用 VPS.NET PHP api,但我不知道如何使用给定的类。例如,我想调用 VPSNET 类中的 getDomains 函数。课程: http: //pastebin.com/wn4UYQB7 感谢您的帮助。

4

1 回答 1

1

未经测试,但类似:

<?php 
//Include the class into the script
include('VPSNET.class.php');

//Start the class & get instance, pass your username, api key ect
$vpsAPI = VPSNET::getInstance($username, $_auth_api_key);

//Call the getDomains method from the class
$result = $vpsAPI->getDomains();

//Do somthing with the result
print_r($result);
?>
于 2012-08-30T07:42:35.427 回答