123456789101112131415161718192021222324252627282930313233343536 |
- <?php namespace Upload\Api;
- use Dever;
- class Save
- {
- public function act($id = 1, $file = '')
- {
- if (!$file) {
- Dever::error('file不存在');
- }
- return Dever::load('save', 'upload')->act($id, $file);
- }
- public function wangEditor($id = 1, $file = '')
- {
- if (!$file) {
- Dever::error('file不存在');
- }
- Dever::config('setting', array('output' => array
- (
- 'status' => array('errno', array('1' => 0, '2' => 1)),
- 'msg' => 'message',
- )));
- return $this->act($id, $file);
- }
- public function avatar($id = 1, $file = '', $uid = false)
- {
- if (!$file) {
- Dever::error('file不存在');
- }
- if (!$uid) {
- Dever::error('uid不存在');
- }
- return Dever::load('save', 'upload')->act($id, $file, 'jpg', $uid);
- }
- }
|