public function hintFromSizeLimit() { if ($this->sizeLimit) { if ($this->hint) { $this->hint .= '<br/>'; } else { $this->hint = ''; } $this->hint .= '檔案大小限制: ' . futil_prettysize($this->sizeLimit * 1024); } return $this; }
public static function pretty_size($bytes) { return futil_prettysize($bytes); }
public function hintFromSizeInfo(array $size = null) { if ($size) { $this->size = $size; } if ($this->sizeLimit) { $this->hint .= '<br/> 檔案大小限制: ' . futil_prettysize($this->sizeLimit * 1024); } if ($this->size && isset($this->size['width']) && isset($this->size['height'])) { $this->hint .= '<br/> 圖片大小: ' . $this->size['width'] . 'x' . $this->size['height']; } return $this; }