解决PhpStorm代码不补全不提示的问题 2018-05-30 Phpstorm 90 words 1 min read 今天phpstorm用着用着发现代码不提示了,不会自动引入类了,然后就在网上找方法,解决办法如下: 进入phpstorm , file -> Invalidate Caches / Resta Read more...
PHP 可变数量的参数列表 … 2018-03-27 PHP 153 words 1 min read PHP在用户自定义函数中支持可变数量的参数列表,在PHP5.6及以上的版本中,由语法…语法实现: 1 2 3 4 5 6 7 8 9 10 11 <?php function sum(...$numbers) { $a = 0; foreach ($numbers as $number) Read more...
三段式版本号,和Composer波浪线符号 ~ 和幂符号 ^ 的区别 2018-03-10 Composer 192 words 1 min read 三段式版本号的意义: 1 2 3 1:大版本 2:小版本 3:补丁版本 ^符号和~符号的意义: 1 2 ~1.2.3 代表 1.2.3 <= 版本号 < 1.3.0 //只改变最末尾的版本 ^1.2.3 代表 1.2.3 <= 版本 Read more...
git tag标签的使用 2018-03-03 git 259 words 1 min read 原来一直不知道composer require这种格式是如何实现的: 1 composer require "sheaxiang/action-log:^1.1" 下面来看下如何实现: 一:首先创建一个git仓库,将代码上传上去 二: Read more...
Laravel的辅助函数列表 2018-02-28 Laravel 2140 words 5 mins read 数组: array_add() 如果给的键不在数组中,则会把给定的键值添加到数组中: 1 2 3 $array = array_add(['name' => 'Desk'], 'price', 100); // ['name' => 'Desk', 'price' => 100] 这里合并数组有另外的一个方法: 1 2 3 $person = ['name' => 'shea'] Read more...
在Windows下设置Redis服务 2018-02-26 Redis 110 words 1 min read Redis常规启动为运行命令: 1 redis-server redis.windows.conf 但这样如果cmd窗口关闭,Redis会消失,所以要将Redis放入Windows服务,需运行命令: 1 redis-server --service-install Read more...
redis启动出错Creating Server TCP listening socket 127.0.0.1:6379: bind: No error 2018-02-26 redis 105 words 1 min read windows下安装redis第一次启动报错: 1 [16768] 26 Feb 13:54:50.513 # Creating Server TCP listening socket 127.0.0.1:6379: bind: No error 解决方法:在命令行中运行 1 2 3 4 5 redis-cli.exe 127.0.0.1:6379>shutdown not connected>exit 然后重新运行redis Read more...
PHP7的新特性详解–返回类型(Return Types) 2018-02-23 PHP 634 words 2 mins read PHP 5.x 目前在PHP 5.x中,没有办法来指定一个方法应该返回哪种类型的结果,你可能会说,可以转换返回的值啊,我们可以猜测返回结果的具体类型,但它 Read more...
PHP 可变变量 “$$” 2018-02-23 PHP 506 words 2 mins read 有时候使用可变变量名是很方便的。就是说,一个变量的变量名可以动态的设置和使用。一个普通的变量通过声明来设置,例如: 1 2 3 <?php $a = 'hello'; ?> 一个可变变 Read more...
关于 RESTful API 设计的总结 2018-02-11 api 2879 words 6 mins read 为什么要用 RESTful RESTful 给我的最大感觉就是规范、易懂和优雅,一个结构清晰、易于理解的 API 完全可以省去许多无意义的沟通和文档。并且 RESTful 现在越来越流行, 在开始 Read more...