2017-06-29 61 views

回答

0

爲了通過的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);