簡體   English   中英

WHM出現錯誤-Sudomain模塊(API)

[英]WHM Getting Error - Sudomain Module (API)

這是通過cpanel API https://imgur.com/a/Yhpkh創建子域時遇到的錯誤

請幫助。

請檢查下面的鏈接,它可能會提供您正在尋找的答案: 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM