application/admin/controller/Uploadify.php
(开头部分) 23KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 易优CMS
* ============================================================================
* 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
* 网站地址: http://www.eyoucms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
* Author: 小虎哥 <1105415366@qq.com>
* Date: 2018-4-3
*/
namespace app\admin\controller;
use think\Db;
class Uploadify extends Base
{
public $image_type = '';
private $imageExt = '';
private $image_accept = '';
/**
* 析构函数
*/
function __construct()
{
parent::__construct();
$this->imageExt = config('global.image_ext');
$this->image_type = tpCache('basic.image_type');
$this->image_type = !empty($this->image_type) ? str_replace('|', ',', $this->image_type) : $this->imageExt;
$this->image_accept = image_accept_arr($this->image_type);
}
/**
* 通用的上传图片
*/
public function upload()
{
$func = input('func');
$path = input('path','allimg');
$num = input('num/d', '1');
$is_water = input('is_water/d', 1);
$default_size = intval(tpCache('basic.file_size') * 1024 * 1024); // 单位为b
$size = input('size/d'); // 单位为kb
$size = empty($size) ? $default_size : $size*1024;
$info = array(
'num' => $num,
'title' => '',
'upload' => url('Ueditor/imageUp',array('savepath'=>$path,'pictitle'=>'banner','dir'=>'images','is_water'=>$is_water)),
'fileList' => url('Uploadify/fileList',array('path'=>$path)),
'size' => $size,
'type' => $this->image_type,
'input' => input('input'),
'func' => empty($func) ? 'undefined' : $func,
'path' => $path,
);
$this->assign('info',$info);
return $this->fetch();
后面还有 570 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
