2017 © Pedro Peláez
 

library php-aliyun-oss

image

niklaslu/php-aliyun-oss

  • Friday, October 14, 2016
  • by niklauslu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 72 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

php-aliyun-oss

php阿里云上传, (*1)

demo

上传本地文件

use niklaslu\AliyunOSS; $aliyunConfig = [ 'access_key_id' => '**************', 'access_key_secret' => '*****************', 'end_point' => 'oss-cn-shenzhen.aliyuncs.com', 'bucket' => '*******', 'domain' => 'http://********.oss-cn-shenzhen.aliyuncs.com/', // 域名 'custom' => false //custom为true时使用自定义域名 ]; $aliyun = new AliyunOSS($aliyunConfig); $obj = $aliyun->getOss(); $file = 'a.txt'; $filepath = dirname(__FILE__)."/".$file; if (file_exists($filepath)){ $res = $aliyun->upload($filepath); print_r($res); }else{ echo '无此文件'; }

The Versions

14/10 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by lucong