
php
自娱自乐22
自娱自乐的看自己的书,
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mac php7.3 odbc安装
Hyperf\Pool\Exception\ConnectionException: Connection reconnect failed.:SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver for SQL Server fo原创 2022-04-14 17:16:42 · 1211 阅读 · 0 评论 -
Homestead+vscode/phpstorm+postman/apipost 断点调试配置
homestead+vscode/phpstorm xdebug 调试配置原创 2022-04-04 11:42:47 · 952 阅读 · 0 评论 -
laravel单元测试
laravel单元测试原创 2021-12-01 11:06:59 · 1318 阅读 · 0 评论 -
guzzlehttp/guzzle使用
中文文档: https://guzzle-cn.readthedocs.io/zh_CN/latest/overview.htmlGITHUB:https://github.com/guzzle/guzzle/简介:Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.安装: composer require guzzlehttp.原创 2021-10-08 14:33:12 · 1514 阅读 · 0 评论 -
laravel日常笔记
laravel日常笔记原创 2021-04-15 14:13:32 · 127 阅读 · 0 评论 -
YYUC框架
YYUC框架学习笔记原创 2021-03-10 11:42:43 · 595 阅读 · 0 评论 -
php如何获取年月日的时间戳和日期的方法
PHP获取时间戳是通过PHP time()函数实现的,PHP获取日期则是通过PHP data()函数实现的,它们具体是如何实现的,下面给出了具体的例子。设置时区date_default_timezone_set(“Asia/Shanghai”);date_default_timezone_set(‘PRC’);//这两种方法效果相同时间戳转日期,可以用date(‘Y-m-s h:i:s’, 具体时间戳来实现)日期转换时间戳,用strtotime(“date()”).时间戳格式//获原创 2020-11-06 15:55:33 · 1578 阅读 · 0 评论 -
php调试工具xdebug的安装和使用
xdebug官网:http://xdebug.org/1. 在自己项目中, 先建一个文件, 内容 phpinfo(); 查看当前php的版本情况.2. 浏览器上 打开网址http://xdebug.org/wizard3. 浏览器打开第一步的内容,复制 phpinfo()的内容,粘贴到 第二步的网站的框中, 点击下面的 分析(analyse my phpinfo() output)4. 上一步点击分析之后的页面中,会显示一些数据,和安装 xdebug 的步骤,如下,我们只需要安装这个步...原创 2020-07-04 16:19:24 · 280 阅读 · 0 评论 -
php常用函数
<?phpheader('Pragma:no-cache');header("Content-type: text/javascript");$version = '20170917'; //版本号if (empty($_SERVER["HTTP_REFERER"])) { //输出无用内容,避免百度检测 $code = '// 商务通代码// document.writeln("<script language=\"javascript\" src=\"http.原创 2020-06-16 19:17:51 · 272 阅读 · 0 评论 -
mac vscode 配置php跳转
1. mac上安装了php2. 在命令行 whereis php(which php)查看php安装路径3. 在vscode中安装 插件 PHP IntelliSence。4. 打开vscode配置,在扩展配置中找到 PHP IntelliSence 的配置"php.executablePath": "/usr/bin/php",5. 保存工作区。6. 重启即可。...原创 2020-04-24 15:21:40 · 1466 阅读 · 0 评论 -
php打包成长zip文件
本文实例为大家分享了PHP文件打包下载zip的具体代码,供大家参考,具体内容如下<?php//获取文件列表function list_dir($dir){$result = array();if (is_dir($dir)){$file_dir = scandir($dir);foreach($file_dir as $file){if (...原创 2020-04-20 10:19:55 · 303 阅读 · 0 评论 -
php操作文件的2个基本函数
file_get_contents() 将文件读入字符串 file_put_contents() 将字符串写入文件原创 2020-04-18 10:09:07 · 160 阅读 · 0 评论 -
Thinkphp3.2.3 多图上传,同类型只能上传一张问题
Thinkphp3.2.3 多图上传,同类型只能上传一张问题,例如一次性上传多张 .jpg 文件,只能上传最后一张,问题在于,同名,只保存一张,找了很多方法,问题就在于 saveName 上在 App-&amp;gt;Common-&amp;gt;Common-&amp;gt;function.php 下加入function guid(){ if (function_exists('com_create...原创 2018-11-20 15:41:11 · 549 阅读 · 0 评论 -
IIS+Tp3.2.3,woff文件上传了但不显示解决方法
服务器环境:IIS7+kangle问题:woff文件确实上传了,但是页面不显示。需要在我们对应网站下的Mime类型中添加文件对应的类型就行了.woff application/x-font-woff.woff2 application/x-font-woff.svg image/svg+xml...原创 2018-11-16 13:42:49 · 239 阅读 · 0 评论 -
mxsrvs支持thinkphp3.2伪静态
在项目配置下加入 location / { index index.php; #ThinkPHP REWRITE支持 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?s=$1 last; break; } }在 nginx.conf中加入location ~ \.php$ { ...原创 2019-01-16 15:02:32 · 1577 阅读 · 1 评论 -
PHP数组和XML相互转换的函数
//数组转xmlfunction ArrToXml($arr){ if(!is_array($arr) || count($arr) == 0) return ''; $xml = "<xml>"; foreach ($arr as $key=>$val) { if (is_numeric($val)){ $xml.="<".$key.">"...转载 2019-02-16 16:46:07 · 128 阅读 · 0 评论 -
微信支付-扫码支付全流程
微信支付官方文档:`https://pay.weixin.qq.com/wiki/doc/api/index.html`微信支付分为2种模式:【模式一】:商户后台系统根据微信支付规则链接生成二维码,链接中带固定参数productid(可定义为产品标识或订单号)。用户扫码后,微信支付系统将productid和用户唯一标识(openid)回调商户后台系统(需要设置支付回调URL),商户后台系统...原创 2019-02-17 17:24:31 · 21047 阅读 · 0 评论 -
微信weui的uploader功能实现(html+js+php[tp3.2])
html&lt;div class="weui-gallery" id="gallery"&gt; &lt;span class="weui-gallery__img" id="galleryImg"&gt;&lt;/span&gt; &原创 2019-02-11 21:48:01 · 1579 阅读 · 3 评论 -
thinkphp 自定义过滤器使用2个参数
{$info.mb_yixiang|setYixiang="1", ###}setYixiang 为自定义函数名,1为第一个参数,###代表 $info.mb_yixiang 的值function setYixiang($id, $str){ //判断$id 在不在 $str 中,在则返回 checked if( strstr($str, $id) ){ ...原创 2019-03-11 19:38:02 · 818 阅读 · 0 评论 -
异步调试,写入文件
//arrayfile_put_contents('info.txt', var_export($arr, true) . "\n", FILE_APPEND);//strfile_put_contents('info.txt', $str . "\n", FILE_APPEND);原创 2019-03-08 10:15:05 · 271 阅读 · 0 评论 -
Mysql 如何不用子查询查询当前数据的上一条和下一条的记录
//上一个$map1['status'] = '1';$map1['isvr'] = '2';$map1['id'] = array('LT', $id);$shangcase = $cases->where($map1)->order('id desc')->limit(1)->find();$this->assign('shangcase',$shan...原创 2019-05-22 11:20:22 · 385 阅读 · 0 评论 -
返回上一步的识别处理
从2级页面进入3级页面,再返回和直接打开3级域名,然后再返回如何做到识别?答:借助于 document.referrer,获取上一页的信息,如果上一页不存在,则返回首页,如果存在,则返回上一步。这种体验度更好。...原创 2018-11-16 09:57:37 · 440 阅读 · 0 评论