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

fsizelimt为什么不能用

WBOY
Release: 2016-06-06 20:40:31
Original
1250 people have browsed it

如题,我同时限制了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>
Copy after login
Copy after login

回复内容:

如题,我同时限制了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>
Copy after login
Copy after login

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template