随笔分类 - php
摘要:location /{ try_files $uri $uri/ /index.php?$query_string; }
阅读全文
摘要:去下载对应的mac或者windows的so扩展包,放到自己的php扩展目录下 https://github.com/Microsoft/msphpsql/releases 去php.ini开启扩展 extension=php_sqlsrv_74_nts.so extension=php_pdo_sq
阅读全文
摘要:server { listen 127.0.0.1:80 default_server; root /; charset utf-8; client_max_body_size 128M; location / { root /usr/local/etc/nginx/html; index inde
阅读全文
摘要:chunk分块的使用 使用with查询数据
阅读全文
摘要:首先下载homebrew https://brew.sh/ 国内如果下载慢的话: 一、获取 install 文件,把官网给的脚本拿下来 curl fsSL https://raw.githubusercontent.com/Homebrew/install/master/install brew_i
阅读全文
摘要:``` public function curl_post($url , $data=array()){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_seto...
阅读全文
摘要:``` try{ // 插入卡号 MemberCardsRelation::insertCardQrcode($cards, $cardidParent); // 创建用户关联卡号的关系 MemberCardsRelation::create($relationInse...
阅读全文
摘要:解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid 重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./nginx s reload重新读取配置文件,发现报nginx: [error] open() "/us
阅读全文
摘要:我的php5.6安装报在 /usr/locl/src目录下面 添加 epel 源 安装依赖 安装php依赖 (有的系统可能会报错,不支持这个写法,那就一个一个来,别着急。) 开始配置,一定要加上openssl 要不然即使安装成了,phpinfo里面没有openssl扩展,还得【重新编译php安装op
阅读全文
摘要:``` /** 所有的分类 * @parem $array 数组 * @parem $pid ,最高级别,默认为0,输出从pid 级别的数据 * @parem $level 层级,默认0 * */ function getTree($array, $pid =0, $level = 0){ $f_name=__FUNCTION__; // 定义当前函数名 //声明静态数...
阅读全文
摘要:Redis 命令参考 本文档是 Redis Command Reference 和 Redis Documentation 的中文翻译版, 阅读这个文档可以帮助你了解 Redis 命令的具体使用方法, 并学会如何使用 Redis 的事务、持久化、复制、Sentinel、集群等功能。
阅读全文
摘要:get、put、post、delete含义与区别 1、GET请求会向数据库发索取数据的请求,从而来获取信息,该请求就像数据库的select操作一样,只是用来查询一下数据,不会修改、增加数据,不会影响资源的内容,即该请求不会产生副作用。无论进行多少次操作,结果都是一样的。 2、与GET不同的是,PUT
阅读全文
摘要:php数组分页主要就是 array_slice函数的使用
阅读全文
摘要:先看demo样式: 1.HTML结构: 2.AngularJS: 3.PHP: ps:请注意,后台返回的回显js 这里是用PHP返回的数组形式。例如: ["/uploads/company/logo/20181119141502_953634848.png", "/uploads/company/l
阅读全文
摘要:</pre><pre name="code" class="php"><?php/** * Created by PhpStorm. * User: qishou * Date: 15-8-2 * Time: 上午9:12 */header("content-type:text/html;chars
阅读全文
摘要://导出word开始 $doc_name = $result['company_info']['ENTNAME']."信用舆情报告.doc"; ob_start(); //打开缓冲区 header("Cache-Control: public"); Header("Content-type: application/octe...
阅读全文
摘要:function curlDownFile($img_url, $save_path = '', $filename = '') { if (trim($img_url) == '') { return false; } if (trim($save_path) == '') { $save_path = './'; } ...
阅读全文
摘要:public function request($url,$https=true,$method='get',$data=null){ //1.初始化url $ch = curl_init($url); //2.设置相关的参数 //字符串不直接输出,进行一个变量的存储 curl_setopt($ch, CUR...
阅读全文
摘要:请注意如果使用的是tp5 框架,它默认返回的html结构是json 需要在配置项里面修改为html: pjax 引用官方地址
阅读全文