- 博客(15)
- 收藏
- 关注
原创 elementui+vue.js table动态添加列且添加动态的绑定值
html部分:<el-table-column v-for="(item,index) in table3.tableTitle" :lable="item.label" :key="index" :prop="item.prop" align="center"> <template slot-scope="{row, index}"> <el-input size="small" type="number" v-model="row[item.prop].
2022-04-18 16:20:05
2242
原创 Wed Sep 16 2020 00:00:00 GMT+0800 (中国标准时间)时间转换为mysql date类型
当选中的时间打印的时候显示:2020 00:00:00 GMT+0800 (中国标准时间)js格式化一下:dateFormat(dateData) {var date = new Date(dateData)var y = date.getFullYear()var m = date.getMonth() + 1 m = m < 10 ? ('0' + m) : mvar d = date.getDate() d = d < 10 ? ('0' + d) : dc
2022-04-18 16:14:53
2599
原创 php进阶
sql库的使用(PHP标准库)1.SplStack,SqlQueue,SplHeap,SplFixedArray等数据结构类SplStack(栈 ——后进先出)$stack = new SqlStack();$stack->push('data1');$stack->push('data2');echo $stack->pop();echo $stack->pop();输出为 "data2 data1"SplQueue(队列——先进先出)$
2022-03-24 17:32:41
485
原创 phpexcel导出
$fileName = "亚马逊品类数据".date('Y-m-d');$fileType = 'xlsx';$sql = "select a.sku,b.product_typename,c.category_status,a.gender,a.sales_status,a.user_name,s.shop_name from amazon_skulist a left join amazon_category b on a.category_id=b.id left join amazon_cat.
2022-03-09 15:31:27
625
原创 phpexcel导入
/* * 亚马逊预留库存数据导入 */public function amazon_reserved_inventory_excel($params){ $file=$params['file']; //获取文件后缀名 $store=$params['store']; $date=$params['date']; $extension = $file->getClientOriginalExtension(); if($extension=='c.
2022-03-09 15:30:10
356
原创 element ui+vue table表头列增加提示
//html部分需要添加提示的列<el-table-column prop="replenishment_remind" align="center" label="补货提醒" :render-header="renderHeader3"> <template slot-scope="{row, index}" style="padding: 0"> <p v-if="row.replenishment_remind==1" style="color: red".
2022-03-09 15:26:18
1587
原创 php小数转为百分率,百分率转为小数
PHP百分号转小数:<?php $a = "20.544545%"; echo (float)$a/100; ?>php 小数转换百分数函数:function xx($n) { return $n*100.'%'; }如果有小说位数有要求sprintf("%01.2f", $n*100).'%';
2022-02-15 16:02:05
331
原创 Laravel file 上传文件信息获取
获取上传的文件$file=$request->file('file');检测上传的文件是否合法,返回值为 true 或 false$file->isValid()获取上传文件的文件名(带后缀,如 abc.png)$filename=$file->getClientOriginalName();获取上传文件的后缀(如 abc.png,获取到的为 png)$fileextension=$file->getClientOriginalExtension();获取上传文件的大
2022-02-14 16:36:08
1961
原创 下载亚马逊MWS接口sdk
https://developer.amazonservices.com/doc/products/products/v20111001/php.html点击上面链接后点右上角菜单-工具,往下拉选择对应语言的sdk,注意每个接口都有单独的sdk,需要哪个接口就点哪个下载
2022-01-21 09:44:42
499
原创 读取txt文件中的内容并转为键值不是数字数组
$file_path = "./cookies.txt";$fp = fopen($file_path,"r");$str = fread($fp,filesize($file_path));$str =str_replace("\r\n","",$str);$str=explode("&",$str);$text=array();foreach ($str as $v){ $text[]=explode(':',$v);}$textcount=count($text);.
2021-12-14 17:54:48
263
原创 php用array_merge函数将多维数组递归降为一维
function arrToOne($multi) { $arr = array(); foreach ($multi as $key => $val) { if( is_array($val) ) { $arr = array_merge($arr, arrToOne($val)); } else { $arr[] = $val; } } return $arr;}
2021-12-08 19:47:03
318
原创 正则表达式取爬取的html代码标签内的内容
curl抓取页面function post($url,$head=false,$foll=1,$ref=false,$post,$proxy,$retry=3,$needheader=false){ global $cookie; $curl = curl_init(); // 启动一个CURL会话 if($head){ curl_setopt($curl,CURLOPT_HTTPHEADER,$head);//模似请求头 } curl_setopt($c
2021-12-08 19:45:14
615
原创 php+chrome headless打印pdf,模拟真人鼠标键盘操作登录
详细说明:https://github.com/chrome-php/chrome
2021-12-02 15:59:50
615
原创 PHP将json字符串转换成数组
例:<?php$data={"state":"success","code":null,"errorMsg":null,"args":null}$arr=json_decode($data,ture);//必须加上ture参数强制转换为数组echo $arr['state'];输出结果是success
2021-11-16 17:52:51
278
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人