阿里云oss对象存储插件

亲自开发的阿里云oss对象存储上传插件,需要的自行下载,安装上就可以用!

4 个评论

很棒!!!有放到海豚官网吗?
感谢分享,建议您可以注册DolpinPHP开发者账号上传至商店
写的真棒棒
你好,我下载了之后报错呢
<div class="echo">
</div>
<div class="exception">
<div class="message">

<div class="info">
<div>
<h2>[0]&nbsp;<abbr title="OSS\Core\OssException">OssException</abbr> in <a class="toggle" title="D:\phpStudy\PHPTutorial\WWW\program\xyhy\HSManage\plugins\AliOss\SDK\src\OSS\OssClient.php line 766">OssClient.php line 766</a></h2>
</div>
<div><h1></h1></div>
</div>

</div>
<div class="source-code">
<pre class="prettyprint lang-php"><ol start="757"><li class="line-757"><code> * @return null
</code></li><li class="line-758"><code> * @throws OssException
</code></li><li class="line-759"><code> */
</code></li><li class="line-760"><code> public function uploadFile($bucket, $object, $file, $options = NULL)
</code></li><li class="line-761"><code> {
</code></li><li class="line-762"><code> $this-&gt;precheckCommon($bucket, $object, $options);
</code></li><li class="line-763"><code> OssUtil::throwOssExceptionWithMessageIfEmpty($file, &quot;file path is invalid&quot;);
</code></li><li class="line-764"><code> $file = OssUtil::encodePath($file);
</code></li><li class="line-765"><code> if (!file_exists($file)) {
</code></li><li class="line-766"><code> throw new OssException($file . &quot; file does not exist&quot;);
</code></li><li class="line-767"><code> }
</code></li><li class="line-768"><code> $options[self::OSS_FILE_UPLOAD] = $file;
</code></li><li class="line-769"><code> $file_size = filesize($options[self::OSS_FILE_UPLOAD]);
</code></li><li class="line-770"><code> $is_check_md5 = $this-&gt;isCheckMD5($options);
</code></li><li class="line-771"><code> if ($is_check_md5) {
</code></li><li class="line-772"><code> $content_md5 = base64_encode(md5_file($options[self::OSS_FILE_UPLOAD], true));
</code></li><li class="line-773"><code> $options[self::OSS_CONTENT_MD5] = $content_md5;
</code></li><li class="line-774"><code> }
</code></li><li class="line-775"><code> if (!isset($options[self::OSS_CONTENT_TYPE])) {

要回复文章请先登录注册