sokucc 发表于 2017-12-31 20:35:10

destoon怎样获取用户上传占用图片空间大小的配置方法

DESTOON可能针对不同的会员设置上传图片空间的大小,如何才能知道用户上传了多少M的图片呢?下面就来解决这个问题!
首先打开文件“根目录/include/global.func.php”最后,粘贴下面的代码:
//=================================
//获取会员图片空间
//=================================
function get_imgsize_user($username)
{
      global $db;
      $_sum_sql = "SELECT sum(countx) as up_sum FROM ((select sum(filesize) as countx from destoon_upload_0 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_1 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_2 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_3 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_5 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_5 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_6 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_7 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_8 where username = '".$username."')UNION ALL(select sum(filesize) as countx from destoon_upload_9 where username = '".$username."')) AS sun_biao";
      $up_sum = $db->get_one($_sum_sql, 'CACHE');
      
      returnbyteFormat($up_sum["up_sum"], "MB");
}

**** Hidden Message *****
页: [1]
查看完整版本: destoon怎样获取用户上传占用图片空间大小的配置方法