img = isset($this->img) ? $this->img : new Handle(); /* $config = array ( 'background' => '/www/grow/data/upload/1/2018/07/19/a49fe8914df0eada4d4b7d530d7fa5ba.jpg', 'param' => array ( 0 => array ( 'method' => 'mark', 'water' => '/www/grow/data/upload/1/2018/07/19/46d5b0c5c25c800cf197ea4f64f503f2.jpg', //left,top 'position' => array(100,200), 'width' => 100, 'height' => 100, ), 1 => array ( 'method' => 'txt', 'name' => 'test文字', 'color' => '#FF0000', 'position' => array(100,200), 'size' => 50, 'angle' => 0, 'font' => '/www/grow/config/fonts/simsun.ttc', ), ), ); */ if (!$filename) { $filename = Dever::id(); } $file = Dever::pathDay('upload/poster', false) . md5($filename) . '.jpg'; if (!is_file($file) || $update == 1) { $this->img->setType($type); $result = $this->img->init($config['background'], $config['param'], true, $file); if ($result) { $file = array_pop($result); } } else { } $host = str_replace(DEVER_PROJECT . '/' . DEVER_APP_NAME . '/', '', Dever::config('host')->base); if (strstr($file, '/share/dc/data/')) { return $host . str_replace('/share/dc/data/', '', $file); } return $host . str_replace(DEVER_PROJECT_PATH, '', $file); $file = Dever::pic($file); return $file; } }