- 博客(21)
- 资源 (2)
- 收藏
- 关注
原创 PHPExecl下载并解决打开execl出现部分内容有问题是否让我们尽量尝试恢复的问题
PHPExecl下载并解决打开execl出现部分内容有问题是否让我们尽量尝试恢复的问题
2021-12-08 11:01:37
1684
原创 PHP采集(附Demo下载)
PHP使用QueryList采集php使用QueryList采集demo下载地址<?phprequire 'vendor/autoload.php';use QL\QueryList;//采集post翻页的页面数据for($i=1; $i<5; $i++){ $url_array = "http://www.sstrc.gov.cn/bigdata/recept/data/moreAchivementView?category=award"; $rule = array(
2021-03-30 14:22:04
205
原创 html变text文本
html变text文本 public function htmltext($content){ $content = preg_replace("/<img\s*src=(\"|\')(.*?)\\1[^>]*>/is",'【图片】', $content); $content = strip_tags($content); $content = trim($content); $content = ereg_rep
2021-03-30 10:00:19
281
原创 PHP算法之四大基础算法
冒泡排序法冒泡排序大概的意思是依次比较相邻的两个数,然后根据大小做出排序,直至最后两位数。由于在排序过程中总是小数往前放,大数往后放,相当于气泡往上升,所以称作冒泡排序。冒泡是从前往后冒,所以,每轮比较的次数也是逐渐减少的,最后一个数不用比较,其时间复杂度为O(n²),算法如下:function bubble_sort($arr) { // 判断参数是否为数组,且不为空 if (!is_array($arr) || empty($arr)) { return $ar
2021-03-26 10:02:44
117
转载 Phpstrom插件
Translation 最好用的翻译插件对于我等英文不好的同学来说,简直是福音.打开翻译对话框 : Ctrl + Shift + O(英文字母o)鼠标取词并翻译 : Ctrl + Shift + Y使用说明 : http://yiiguxing.github.io/TranslationPlugin/start.htmlCodeGlance 代码地图插件 , 类似SublimeText的Mini Map插件Background Image Plus这是一款装13插件了,想想别人.
2021-02-25 16:38:15
179
原创 清除浏览器js文件缓存
清除浏览器js文件缓存首先按 F12 键进入浏览器的开发者模式, 接着点击图片所示的 Network 此时勾选 Disable cache 就完成了.这个时候只需要刷新页面 F5 即可加载最新版本的JS文件, 即可展示对JS文件做出的改动...
2020-11-30 15:04:49
483
原创 CSS显示一行,超出以省略号代替
CSS显示一行,超出以省略号代替 .text{ width: 300px; overflow: hidden;/*超出部分隐藏*/ white-space: nowrap;/*不换行*/ text-overflow:ellipsis;/*超出部分文字以...显示*/ }
2020-11-30 14:31:00
642
原创 使用JavaScript在IE浏览器中提示跳转到其他浏览器
使用JavaScript在IE浏览器中提示跳转到其他浏览器<script type="text/javascript"> (function(window){ var userAgent = navigator.userAgent; var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
2020-11-25 16:50:53
2768
1
原创 HTML引入百度富文本编辑器ueditor
HTML引入百度富文本编辑器ueditor首先下载百度编辑器ueditor下载地址 http://ueditor.baidu.com/website/download.html然后创建ueditor.html文件,引入百度编辑器,然后在html文件内引入,然后再用js实例化编辑器即可,代码如下:<!DOCTYPE html><html><head><title>百度编辑器</title></head><bod
2020-11-25 16:41:16
1919
1
原创 JavaScript实现公告上下滚动
JS公告上下滚动html前端代码<ul class="ul" style="list-style: none;margin: 0;"> <li style="margin-left: -40px;">这是第一条公告</li> <li style="margin-left: -40px;">这是第二条公告</li> <li style="margin-left: -40px;">这是第三条公告</li>&
2020-11-25 16:23:35
1266
原创 PHP多name值多文件上传
PHP多name值多文件上传前端使用的时bootstrap框架后端使用php前端页面效果展示前端代码<div class="form-group row col-md-12" style="border-bottom: 2px solid #eee;" id="allonm"> <label class="col-sm-6 col-form-label">附录1</label> <div class="input-group col-sm-
2020-11-16 16:06:04
159
原创 php生成word并下载
php生成word并下载//后端代码 public function actionDown(){ //需要进行下载的页面 $result = file_get_contents('test.php"); header("Accept-Ranges: bytes"); header("Accept-Length: ".strlen($result)); header('Content-Disposition: attachment; filename=test.do
2020-11-13 15:37:08
435
原创 PHP使用ZipArchive进行多文件压缩并下载
ZipArchive进行多文件压缩并下载多文件压缩其实就是通过数组遍历调用addfile```phppublic function actionZipfile() { header("Content-Type:text/html; charset=UTF-8"); $array= array('upload/test.png','upload/test1.png'); // 最终生成的文件名(含路径) $filename = 'upload/'.da
2020-11-13 15:23:22
326
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人