转换数据大小为MB单位
This commit is contained in:
parent
a8d5f9dbc4
commit
bbdb44aa63
|
@ -175,7 +175,12 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
$sql="select sum(file_size) as fsize from westdc_fileinfo where meta_uuid = ?";
|
||||
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$row=$this->db->fetchRow($sql,array($uuid));
|
||||
$transize_path->item(0)->nodeValue=$row->fsize;
|
||||
//转换单位为MB
|
||||
$msize=round($row->fsize/(1024*1024),2);
|
||||
if($msize>10){
|
||||
$msize=round($size/(1024*1024),1);
|
||||
}
|
||||
$transize_path->item(0)->nodeValue=msize;
|
||||
$new_data = $dom->saveXML($root->item(0));
|
||||
//防止错误
|
||||
if (!empty($new_data))
|
||||
|
|
Loading…
Reference in New Issue