rs_pub_domain.php 465 B

12345678910111213141516171819
  1. <?php
  2. require_once __DIR__ . '/../autoload.php';
  3. use \Qiniu\Auth;
  4. $accessKey = 'gwd_gV4gPKZZsmEOvAuNU1AcumicmuHooTfu64q5';
  5. $secretKey = '9G4isTkVuj5ITPqH1ajhljJMTc2k4m-hZh5r5ZsK';
  6. $bucket = 'file';
  7. $domain = 'lfxfile.qiniuts.com';
  8. $auth = new Auth($accessKey, $secretKey);
  9. $config = new \Qiniu\Config();
  10. $bucketManager = new \Qiniu\Storage\BucketManager($auth, $config);
  11. $err = $bucketManager->publishDomain($bucket, $domain);
  12. if ($err) {
  13. print_r($err);
  14. }