- 博客(16)
- 收藏
- 关注
原创 PhpSpreadsheet表格导入与导出
<?phpnamespace App\Admin\Libraries;/** * excel表格导入 导出 * */use PhpOffice\PhpSpreadsheet\Spreadsheet;use PhpOffice\PhpSpreadsheet\Writer\Xlsx;use PhpOffice\PhpSpreadsheet\IOFactory;class Excel{ private $spreadsheet; private $sheet; functio
2022-02-09 11:02:22
1023
原创 宝塔配置反向代理出现“伪静态/nginx主配置/vhost/文件已经存在全局反向代理”
伪静态/nginx主配置/vhost/文件已经存在全局反向代理使用宝塔配置nginx反向代理时候出现得问题,一通百度,找到原因,网站域名配置了伪静态规则,就会出现这个原因,把伪静态去掉,就好了;...
2021-12-02 14:41:37
6485
原创 pdf.js跨域请求pdf文件_以文件流方式
使用前端插件pdf.js 在h5页面在线浏览pdf文件,与之前使用不一样得地方是,pdf文件存放在其他服务器,还按照原来使用得方法果不其然得报错,跨域了,网上目前找的办法中,说的最多得,是把判断跨域得js代码给注释了,就是这段if (origin !== viewerOrigin && protocol !== 'blob:') { throw new Error('file origin does not match viewer\'s');}然而,没屌用,不知道是我版本得问题
2021-02-20 17:16:46
1919
原创 php分片上传_大视频文件_js异步上传大文件
前端部分:切割文件,然后递归上传,开始使用循环,但是循环时 不可以异步上传,分片的顺序会乱,只能同步,但是同步的时候,进度条那里就不好使了,最后改成递归异步,问题都解决了,开心;<input id="video" type="file" name="video">//视频分段 $("#video").change(function(){ videupload(); }) var bytesPerPiece = 1024 * 1024 *
2020-12-22 10:05:11
498
2
原创 mpdf php 生成pdf
使用 mpdf 来生成;通过 composer 安装$ composer require mpdf/mpdfrequire_once 目录.'/vendor/autoload.php';$str = '<h2>我是pdf</h2>';$config = [ 'mode'=>'utf-8', 'useSubstitutions'=>true,//允许替换字体 'default_font_size' => '15'//设置字体
2020-12-19 11:50:45
315
1
原创 PHPExcel导入到数据库
使用PHPExcel 读取excel表格数据到数据库;//创建一个读取excel数据,可用于入库function readExcel($file){ // $file = '.'.$file; ini_set('max_execution_time', '0'); $objPHPExcel = new \PHPExcel(); // 判断使用哪种格式 $objReader = \PHPExcel_IOFactory::createReader('Excel20
2020-11-12 14:44:59
246
转载 { parser: “babylon“ } is deprecated; we now treat it as { parser: “babel“ }.
学习webpack遇到的问题{ parser: “babylon” } is deprecated; we now treat it as { parser: “babel” }.错误原因 prettier版本导致的解决办法npm install prettier@~1.12.0 --save-dev成功!记录下来,巩固记忆办法来源: https://blog.youkuaiyun.com/u011280778/article/details/88107472...
2020-10-29 12:01:36
166
原创 tp5.1 qrcode
下载phpqrcode.php,重命名为QRcode.php;把QRcode.php放到\extend\phpqrcode\目录下,完整路径为\extend\phpqrcode\QRcode.php;在QRcode.php第一行增加命名空间:namespace phpqrcode;在控制器头部引用phpqrcode:use phpqrcode\QRcode;生成二维码方法//qr-code 二维码 function qr_code(){ $url = 'https://www.bai
2020-09-25 18:09:24
386
原创 input name[] js取值
用js 取值,var name=$(".doctor_id").map(function(){ return this.value }).get().join(','); console.log(name);
2020-05-22 16:07:01
686
原创 Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/svnrepos/thinkphp/base.php
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/svnrepos/thinkphp/base.php) is not within the allowed path(s): (/www/wwwroot/svnrepos/public/:/tmp/:/proc/) in /www/wwwroot/sv...
2020-03-13 09:01:02
14334
1
原创 svn: E170000: URL 'svn://39.101.220.235/svnrepos' doesn't exist
练手配置了个svn 出现的问题,百度一圈,找到的解决办法是checkout时,提示:URL ‘svn://39.101.220.235/svnrepos’ doesn’t exist如果你的svn库的路径为:/home/svn/svnrepos那么你启动时,不能用命令:svnserve -d -r /home/svn/svntest而要用命令:svnserve -d -r /home...
2020-03-11 21:26:47
4326
1
原创 thinkphp5 模型类查询的数据怎么使用
记录下学习遇到的问题;thinkphp5 使用模型类查询的数据 返回的是 对象,不知道咋直接用,网上找的办法对象类型转换数组;解决办法:打开 database.php 增加或修改参数‘resultset_type’ => ‘\think\Collection’,即可连贯操作model(‘user’)->select()->toArray()主要是toArray()这...
2020-02-22 21:27:36
506
原创 thinkphp5.1在本地运行时,dump打印前面总是多一行路径
学习thinkphp5.1框架时候,发现个事儿,dump打印总是在前面有一行路径非常蛋疼,虽然不影响啥,看着别扭;解决办法:在php.ini中的xdebug中加一行代码:xdebug.overload_var_dump=1重启下服务可以了 ,顺眼多了;记下来,省得以后忘...
2020-02-22 12:08:08
422
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人