Ingen beskrivning

persistent_fop_init.php 413B

12345678910111213141516171819
  1. <?php
  2. require_once __DIR__ . '/../autoload.php';
  3. use Qiniu\Auth;
  4. use Qiniu\Config;
  5. use Qiniu\Processing\PersistentFop;
  6. // 控制台获取密钥:https://portal.qiniu.com/user/key
  7. $accessKey = getenv('QINIU_ACCESS_KEY');
  8. $secretKey = getenv('QINIU_SECRET_KEY');
  9. $auth = new Auth($accessKey, $secretKey);
  10. $config = new Config();
  11. $config->useHTTPS=true;
  12. // 初始化
  13. $pfop = new PersistentFop($auth, $config);