自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 thinkphp6 过滤XSS攻击 详解

首先使用composer执行命令composer require ezyang/htmlpurifier在app/common.php公共文件中定义remove_xss函数if (!function_exists('remove_xss')) { //使用htmlpurifier防范xss攻击 function remove_xss($string){ //相对index.php入口文件,引入HTMLPurifier.auto.php核心文件 .

2021-12-15 17:24:17 596

原创 Thinkphp6 七牛云图片上传 详解

首先获取Access Key和Secret KeyComposer下载composer require lorine/oss-utils上代码use Lorine\OssUtils\OssService; $config = [ 'ak' => 'xxxxxx',//SecretId /Access_Key 'sk' => 'xxxxxx',//SecretKe /Secret_Key...

2021-12-14 18:20:52 790

原创 thinkphp6 Excel导入导出 包含图片

composer下载composer require phpoffice/phpspreadsheetpublic function export() { $data = $this->model->field('type_name,image,statusswitch')->select(); //创建一个新的excel文档 $newExcel = new Spreadsheet(); /.

2021-12-12 21:16:58 675 2

原创 thinkphp6 Excel导入导出 详解

composer下载composer require phpoffice/phpspreadsheet导入导出<?phpnamespace app\index\lib;use PhpOffice\PhpSpreadsheet\Cell\Coordinate;use PhpOffice\PhpSpreadsheet\IOFactory;use PhpOffice\PhpSpreadsheet\Spreadsheet;use think\exception\Validate.

2021-12-01 16:48:51 519

原创 无限级分类 详解

if(!function_exists("get_cate_list")){ //返回无限级分类菜单 function get_cate_list($list,$pid=0,$f=0){ //声明一个静态数组存储处理后的数据 static $arr = []; foreach($list as $val){ if($val['pid']==$pid){ $val['level'] ...

2021-11-28 14:45:25 547

原创 thinkphp6 token令牌 生成详解

颁发token令牌

2021-11-27 21:02:43 1931

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除