[英]WHM API: Getting output JSON elements in a random order each time
[英]WHM Getting Error - Sudomain Module (API)
請檢查下面的鏈接,它可能會提供您正在尋找的答案: https : //forums.cpanel.net/threads/add-subdomain-using-api.119609/
要通過cpanel API創建子域,您可以嘗試以下代碼:-
require_once 'xmlapi.php';
$api2args = array(
'domain' => 'subdomain', // name of the subdomain to be created
'rootdomain' => 'example.com', // main domain under which sub
domain needs to be created
'dir' => '/public_html/directory_name', // directory to generate
for this subdomain
'disallowdot' => '1'
);
$result = $xmlapi->api2_query($cpanel['username'], 'SubDomain',
'addsubdomain', $api2args);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.