- 博客(31)
- 资源 (3)
- 收藏
- 关注
原创 phpstorm安装注解插件
如果出现:plugin was not installed:cannot download 未安装插件:无法下载plugin was not installed:cannot download 后面是https的链接重启PHPstorm
2020-10-23 10:27:59
703
原创 php返回数据格式
直接使用json文件返回的数据:使用接口返回的数据:返回的其实是html格式 所以返回的res.data是undefined解决:1.接口处理:2.页面处理:
2020-07-11 16:50:39
391
原创 PHP:用curl请求接口时出现SSLcertificate:unabletogetlocalissuercertificate的解决办法
$err = "SSLcertificate:unabletogetlocalissuercertificate"解决办法:到http://curl.haxx.se/ca/cacert.pem下载pem文件,并将文件拷贝到D:\phpStudy\PHPTutorial\cacert.pem在php.ini增加curl.cainfo = "D:\phpStudy\PHPTutorial\cacert.pem"...
2020-05-13 11:42:05
178
原创 php7 + lumen开发报错问题
PHP7和lumen的event的冲突导致;解决方式一:修改php.ini 注释掉event扩展解决方式二:
2020-05-12 20:28:26
290
原创 搭建centos服务器遇到的问题汇总
初始的服务器:file not foundnginx/error.log:FastCGI sent instderr: “Primary script unknown”可能的原因:php-fpm.conf 中设置了错误的用户和组别默认的php-fpm.conf 中会 include 这个一个文件夹(可能会不同): include=/us...
2020-04-12 22:14:32
459
原创 解决MySQL:版本问题
解决MySQL:版本问题:use mysql;ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';sql_mode问题:vim /etc/my.cnfservice mysqld restart 将mysql.user中数据不小心删除了:Mysql Error:T...
2019-08-16 20:07:48
134
转载 The server requested authentication method unknown to the client
mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示The server requested authentication method unknown to the client查阅一些相关的资料后发现是由于新版本的mysql账号密码解锁机制不一致导致的解决办法:删除创建的用户和授权,找到mysql配置文件并加入default_authentic...
2019-08-16 10:58:01
3034
转载 让linux时间与internet时间同步(centos)
执行命令:ntpdate cn.pool.ntp.org如提示命令不存在,直接输入:yum install ntp -y 安装ntp软件包1. date命令:#date显示系统时间2.hwclock命令 (即hardwareclock系统硬件时间)#hwclock显示硬件时间#hwclock -w将系统时间写入到系统硬件当中3.ntpdatent...
2019-08-05 11:28:48
111
原创 git相关配置
git config --global credential.helper store之后再次执行git push 或者git pull这时候还需要输入用户名和密码设置git命令颜色git config --global color.status autogit config --global color.diff autogit config --global color.br...
2019-07-26 16:16:12
220
原创 PHP数组笛卡尔积组合排列
public function _arrGroup($arr) { //计算每一个数组的长度 $len = 1; $arrLen = count($arr); //需要排列数组有多少个 $recIndex = null; //记录当前该取的位置 //foreach 计数 $count_3 = ...
2019-07-20 22:20:55
132
原创 mysql设计规范
数据库命令规范 所有数据库对象名称必须使用小写字母并用下划线分割 所有数据库对象名称禁止使用mysql保留关键字(如果表名中包含关键字查询时,需要将其用单引号括起来) 数据库对象的命名要能做到见名识意,并且最后不要超过32个字符 临时库表必须以tmp_为前缀并以日期为后缀,备份表必须以bak_为前缀并以日期(时间戳)为后缀 所有存储相同数据的列名和列类...
2019-07-18 19:28:23
100
原创 linux-php项目not found问题
服务器是centos7.ova导入到vmvare中,配置nginx服务后,访问项目域名,一直是file not found:tail -f error.log将项目代码目录加权限或者干掉nobody用户...
2019-07-05 20:55:25
412
原创 mysql
mysql 查询 a大于b输出a,b大于c输出 1.方案一: select (case when a>b then a else b end ), (case when b>c then b esle c end) from 表名 2.方案二: select if(a>b,a,b...
2019-07-02 16:28:15
117
原创 PHP获取完整的url地址
在使用PHP的$_SERVER['REQUEST_URI']时,例如$url = $_SERVER['REQUEST_URI'] ; (/cm/version.php?protocol_id=1000172&title=3333)当用$_REQUEST[]获取url时,url地址中&后的参数会被截取掉。可以将url进行转义来获取完整的url地址$url = urlen...
2019-04-09 16:12:30
157
原创 Linux中查找某个目录下所有文件中的某个关键字
grep 'xxx' `find /file_dir -name '*.*'` (/file_dir 为.代表当前目录)例如在当前目录下查找关键字:keywgrep 'keyw' `find . -name '*.*'`
2019-03-14 15:33:37
4733
原创 PHP退出登录,彻底清除session和cookie
场景:session存储在redis中,退出登录清除session清不彻底原代码:foreach($_SESSION as $key=>$val){ unset($_SESSION[$key]);}改进版:$_SESSION = null;if(isset($_COOKIE[session_name()])){ setcookie(session_...
2019-03-12 16:48:04
903
原创 VMware配置CentOS6远程连接
1.本机设置VMware Virtual Ethernet Adapter for VMnet8属性2.设置共享3.设置属性:自动获取IP地址VMware虚拟机网络适配器设置为NAT模式修改配置文件vim /etc/sysconfig/network-scripts/ifcfg-eth0:service network restart重启网络查看虚拟主机...
2019-02-28 16:06:00
362
原创 PHP foreach中的引用
一般写法:foreach($result as $key=>$info){ switch($info['status']){ case self::STATUS_DELETED: $result[$key]['status_name'] = '已删除'; $result[$key]['action_act'] = '...
2019-01-15 11:39:10
349
原创 PHP openssl加密解密
https://www.cnblogs.com/sixiong/p/5885111.html原理:javascript加密PHP解密; 完全依赖openssl; openssl 是干嘛的它集成了众多密码算法及实用工具 rsa加密流程;(今天只讲众多加密方式中的一种)1. 在当前文件夹下生成一个包含 "公钥"和"私钥" 两部分内容的文本文件; 命名test....
2018-12-14 10:00:21
1768
原创 windows下安装PHP的Redis扩展
1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本。根据以上phpinfo中的信息,选择合适的redis和igbinary扩展文件https://windows.php.net/downloads/pecl/releases/redis/2.2.7/https://windows.php.net/downloads/pecl/releases/igbinary...
2018-12-13 16:12:52
367
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人