public function get($path, $ifthumb) { $dir = dirname($path); $file = basename($path); if ($ifthumb & 2) { $dir .= '/thumb/mini'; } elseif ($ifthumb & 1) { $dir .= '/thumb'; } return Windid::attachUrl() . '/' . $dir . '/' . $file; }
public function __construct() { $this->attachUrl = Windid::attachUrl(); }
public function getAttachInfo() { $array = current($this->attachs); $path = Windid::attachUrl() . '/' . $array['path']; //list($path) = geturl($array['attachurl'], 'lf', $array['ifthumb']&1); return array('aid' => $array['aid'], 'path' => $path); }