随笔分类 -  php

摘要:生成wsdl文件,php不能生成入参对象的形式,用java生成比较简单。 安装IntelliJ IDEA sdk:1.8(不要使用高版本) 打开项目 下载soap.zip,IDEA打开项目。 左侧项目列表,右键项目名称,打开模块设置【F4快捷键】,点击项目SDK选择1.8,点击确定。 右下角弹窗【找 阅读全文
posted @ 2022-11-09 15:31 大智如蠢 阅读(382) 评论(0) 推荐(0)
摘要:几种情况: 1.window可以 liunx乱码 检查文件写入文件夹时已经是乱码 解决方法:写入文件的时候转码 iconv('utf-8', 'gb2312','中文名称'); 2.window乱码 检查文件写入文件夹时已经是乱码 如果不是乱码 把代码传到服务器上面测试 是否正常能导出中文 如果还是 阅读全文
posted @ 2021-04-30 13:38 大智如蠢 阅读(125) 评论(0) 推荐(0)
摘要:不是经常使用 记录下预防忘记 多个key取数组值 $keys = ['a','b','c','d']; $array = ['a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5]; echo '<pre>'; var_dump(array_intersect_key($array,a 阅读全文
posted @ 2021-04-20 17:38 大智如蠢 阅读(381) 评论(0) 推荐(0)
摘要:快捷键:ctrl+shift+f 或者 编辑->查找->在路径中查找 在按快捷键:ctrl+shift+r 阅读全文
posted @ 2020-12-18 14:29 大智如蠢 阅读(1235) 评论(0) 推荐(0)
摘要:坑 大坑 字符串多的时候 需要分割去加减密 网上基本上帖子都是 117 128 然后就提示标题报错了 解决方法 $key_len = openssl_pkey_get_details($pri_key)['bits']; $part_len = $key_len / 8; 计算出实际分割的长度 原文 阅读全文
posted @ 2020-10-23 15:22 大智如蠢 阅读(1529) 评论(0) 推荐(0)
摘要:<?php class Csv_export { function render($filename,$title,$data=[]){ ob_end_clean(); header("Content-Type: application/force-download"); header("Conte 阅读全文
posted @ 2020-05-14 16:15 大智如蠢 阅读(492) 评论(0) 推荐(0)
摘要:use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Cell\DataType; static function export($filename,$title,$data){ $spreadsheet = n 阅读全文
posted @ 2020-05-13 13:02 大智如蠢 阅读(720) 评论(1) 推荐(0)
摘要:WPS能正常打开 office word 打开失败 代码中修改导出文件后缀为【.doc】就能正常打开 阅读全文
posted @ 2020-04-10 17:33 大智如蠢 阅读(440) 评论(0) 推荐(0)
摘要:<?php $content = "测试: 测试 测试。 测试 测试 测试"; $content = json_encode($content); ?> <script> var content = '<?=$content?>'; content = JSON.parse(content); co 阅读全文
posted @ 2020-03-19 11:27 大智如蠢 阅读(438) 评论(0) 推荐(0)
摘要:<?php /** * 上传文件类 * Class UploadFile * 使用方法 * $this->load->library('uploadfile',['path','jpg,png,pdf','2','file']); * $this->uploadfile->upload(); * 数 阅读全文
posted @ 2020-03-13 18:29 大智如蠢 阅读(381) 评论(0) 推荐(0)
摘要:通过PHP抓取页面在显示出来 <?php$url = 'http://www.baidu.com'; $content = file_get_contents($url); $content = str_replace('/static/',$url .'/static/',$content); $ 阅读全文
posted @ 2019-12-24 19:44 大智如蠢 阅读(1025) 评论(0) 推荐(0)
摘要:<?php /** * Modular: * Created: PhpStorm. * User: dbag * Date: 2019/9/2 * Time: 15:06 */ class Demo { protected $table=''; protected $where=''; protected $field='*'; public function where($where="1=1" 阅读全文
posted @ 2019-09-02 15:38 大智如蠢 阅读(314) 评论(0) 推荐(0)
摘要:function getTreeKey($arr,$level){ $count = count($arr)-1; $key = ''; for ($i=$count;$i>=0;$i--){ if(($arr[$i]['level']==($level-1)) && $key==''){ ... 阅读全文
posted @ 2019-08-02 14:23 大智如蠢 阅读(304) 评论(0) 推荐(0)
摘要:代码地址: https://github.com/9499574/demo_chat_room 阅读全文
posted @ 2019-06-13 17:20 大智如蠢 阅读(825) 评论(0) 推荐(0)
摘要:1.下载地址 http://sphinxsearch.com/downloads/current/ 2.解压文件放到盘内 3.根目录创建 data 和 log 文件夹 4.复制 etc目录下的 min.conf 到 bin目录 并修改成 后缀.conf 文件 5.修改.conf内容 6.生成文件 7 阅读全文
posted @ 2019-06-03 13:41 大智如蠢 阅读(1139) 评论(1) 推荐(0)
摘要:codeigniter-base-model使用文档 1.ORM与其他查询的区别 2.创建模型 models文件夹下创建Testa.php 3.控制器调用 4.CRUD方法 _where($where) $where = ['id'=>1] 或者 $where = "id=1" 2种写法 下面$wh 阅读全文
posted @ 2018-10-17 10:55 大智如蠢 阅读(514) 评论(0) 推荐(0)
摘要:1 $page = $this->get('page'); 2 $limit = $this->get('limit'); 3 $arr = array_chunk($data,$limit)[$page-1]; 阅读全文
posted @ 2018-08-15 17:10 大智如蠢 阅读(402) 评论(0) 推荐(0)
摘要:先上效果图 代码有点蠢 大神勿喷 这样的数据结构拿到后来计算合成单元格的跨度 比如: A1:A30 B1:E1 这种 附上全部代码 CI框架写的 阅读全文
posted @ 2018-07-31 22:23 大智如蠢 阅读(5006) 评论(0) 推荐(0)
摘要:function preview($cate_id){ $data = $this->getTreeSon($cate_id,[$cate_id]); dump($data); } function getTreeSon($cate_id,$arr){ $data = $this->db->where("cate_pid=$... 阅读全文
posted @ 2018-06-14 20:46 大智如蠢 阅读(309) 评论(0) 推荐(0)
摘要:'; echo '登陆成功'; } 阅读全文
posted @ 2018-05-14 23:24 大智如蠢 阅读(185) 评论(0) 推荐(0)