Home > Backend Development > PHP Tutorial > php-【PHP】uchome上传视频时如何得到可用空间

php-【PHP】uchome上传视频时如何得到可用空间

WBOY
Release: 2016-06-02 11:29:31
Original
1056 people have browsed it

uchomephp

刚毕业工作4个多月,接触的东西不多,最近公司一个项目用到uchome,完全搞不懂哪里是哪里,想请教一下各位,在上传视频的时候怎么查询出现在用户的可用空间?

<code>        $userid = $_POST['supe_uid'];        $space = getspace($userid);        $maxattachsize = checkperm('maxattachsize');//单位MB        echo 'maxattachsize:'.$maxattachsize.'addsize:'.$space['addsize'].'attachsize:'.$space['attachsize'].'filesize:'.$FILE['size'];exit;        if($maxattachsize) {//0为不限制            if($space['attachsize'] + $FILE['size'] > $maxattachsize + $space['addsize']) {                echo "剩余空间不足,上传失败";                exit;            }        }</code>
Copy after login

$space['addsize']好像是用户的个人额外空间,但是用户组的空间怎么查?是那个$maxattachsize么?可是这个设置成1M,它查询出来也是200M.....

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