![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
编程小飞侠
点点滴滴学海无涯
一以贯之的努力,不得懈怠的人生
展开
-
php || html下载成word
要下载的html(1.html):<!DOCTYPE html><html><head> <title>PHP生成Word文档</title> <meta charset="utf-8"></head><body> <h1 style="text-align: center">xxx的简历</h1> <h3>编号:000001</h3> &原创 2021-11-11 09:01:31 · 220 阅读 · 0 评论 -
php || 上传图片,pdf等文件到本地/upload;再实现保存本地路径到数据库
html代码(上传图片,文件):<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>上传页面</title> </head> <body> <script language="javascript">原创 2021-11-11 09:00:55 · 980 阅读 · 0 评论 -
thinkphp || Redis查数据
控制器 :use think\Redis; $list = Db::name('order')->order('order_id desc')->paginate(15); } $page = $list->render(); $data = $list->toArray()['data']; foreach ($data as $k => $v) { $data[$k]['pa原创 2021-09-04 14:29:22 · 335 阅读 · 0 评论 -
微信小程序 样式适配
page 1px = 750rpx(page为页面的大小。calc是css,wxss都支持的一个属性,在使用时750和rpx之间不能留空格,运算符两边也不能留空格。)如果页面为375px那么1px = calc(750rpx/375)手机宽度:100vw手机高度:100vh...原创 2021-09-04 14:26:56 · 308 阅读 · 0 评论 -
原生小程序富文本图片适应手机屏幕,放大功能
.wxml<view wx:if="{{word}}" wx:for="{{word}}" wx:key="index" class="word"> <view class='word_title'>{{item.title}}</view> <image src='{{item.image}}' mode="heightFix" class="word_image" bindtap='bandBigImage' data-current="{{item.im原创 2021-09-04 14:26:25 · 224 阅读 · 0 评论 -
原生小程序 长按保存图片
.wxmllongpress:手指触摸后,超过350ms再离开,如果指定了事件回调函数并触发了这个事件,tap事件将不被触发<view class="poster"> <image src="{{poster}}" bindlongpress="saveImage" data-url="{{poster}}"></image> </view>.js// 长按保存功能--授权部分 saveImage(e) { let _this =原创 2021-09-04 14:26:09 · 172 阅读 · 0 评论 -
thinkphp5.1 || 完整url访问,静态css,js没有效果
上面这种url访问时,可以正常显示css,js效果。但是下面这种完整url访问同一个html时,css,js都不能正常显示。原因是引入的静态css,js路径有问题,不同url访问,相对路径会不一样,所有要用下面的绝对路径。具体操作如下:在入口文件public/index.php下定义常量如下://定义引用css,js等文件的常量SITE_URLdefine('SITE_URL','http://'.$_SERVER['HTTP_HOST']); 在config文件夹的templat.原创 2020-12-31 09:06:08 · 612 阅读 · 0 评论