Home >Backend Development >PHP Tutorial >fsizelimt为什么不能用

fsizelimt为什么不能用

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:40:311269browse

如题,我同时限制了minetype和size,但只有前者起作用,后一个限制不了。

<code>if ($xianzhi=="ture"){
   $putPolicy->MimeLimit = $leixing;
   $putPolicy->fsizeLimit = 200;
}
    $upToken = $putPolicy->Token(null);
    $arr['uptoken'] = $upToken;
    print_r(json_encode($arr));
</code>

回复内容:

如题,我同时限制了minetype和size,但只有前者起作用,后一个限制不了。

<code>if ($xianzhi=="ture"){
   $putPolicy->MimeLimit = $leixing;
   $putPolicy->fsizeLimit = 200;
}
    $upToken = $putPolicy->Token(null);
    $arr['uptoken'] = $upToken;
    print_r(json_encode($arr));
</code>

$putPolicy->FsizeLimit,https://github.com/qiniu/php-sdk/blob/develop/qiniu/rs.php 这里有上传策略类的各变量的声明,你可以参考下。

因为你的变量大小写错了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn