- 博客(12)
- 资源 (2)
- 收藏
- 关注
原创 thinkphp 访问输出 No input file specified.
.htaccess文件中的RewriteRule ^(.*)index.php/index.php/ index.php/1 [QSA,PT,L]在默认情况下会导致No input file specified.修改重写规则可以解决改问题网上大多解决方案是:加个问号,RewriteRule ^(.*)index.php?/index.php?/ index.php?/1 [QS...
2018-06-29 13:51:21
1714
原创 thinkphp5.1完美集成gatewayworker,支持windows/linux
下载链接thinkphp5.1完美集成gatewayworker已经完成基础集成:businessworker启动后可以在代码中使用TP的绝大部分类库, 同时实现在TPweb项目中使用gatewayclient的推送能力,做了linux/windows下的两套启动文件。 所有文件都是composer安装,可以使用composer update直接更新各组件...
2018-05-08 10:08:32
6155
原创 用PHP快速开发一个爬虫,用到的开源库
当出现快速开发字样的时候就说明不能从零开始了。所以推荐以下三方库。http请求库 以下两个request 要求php: >=5.2guzzle 要求php: >=5.5有条件还是采用guzzlehtml解析库phpQuerysimple_html_dom再有想到的再来补充
2017-11-27 17:29:15
874
原创 leafletjs右键菜单
官方右键插件示例代码中是创建地图同时给入右键菜单参数。var map = L.map('map', { contextmenu: true, contextmenuWidth: 140, contextmenuItems: [{ text: 'Show coordinates', callback: showCoordinates },
2017-11-15 14:31:28
4788
转载 辨析 new self(); new static();
辨析new self();new static();参见class A { public static function get_self() { return new self(); } public static function get_static() { return new static(); }}class B ext
2017-07-12 11:30:40
354
原创 集成GatewayWorker和Thinkphp5
命令行输入composer命令:composer create-project topthink/think tp5 --prefer-dist稍等片刻thinkphp即可安装完成 安装完成thinkphp后再安装gatewayworker 命令行切换到tp根目录,运行命令:composer require workerman/gateway-worker-for-win创建push\con
2017-06-21 16:46:56
5525
1
原创 JavaScript删除数组中的值
上代码吧delete删除var aa = ['aa','sdf']for (var prop in aa) { delete aa[prop]; console.log(aa);}结果[1: "sdf"][]splice删除var bb = ['aa','sdf']for (var prop in bb) { bb.splice(prop,1); console
2017-03-15 11:53:54
355
原创 JavaScript清空数组
JavaScript清空一个数组可以使用 .length=0来操作测试代码如下var aa = ['aa','sdf']console.log(aa);console.log(aa.length);aa.length = 0;console.log(aa);console.log(aa.length);aa.push('fgg');console.log(aa);console.lo
2017-03-15 11:31:36
249
原创 js和php中if判断空数组的差异
今天看到串代码做了个小测试js中var aa = []if (aa){ console.log(aa);}php中$aa = [];if (!$aa){ var_dump($aa);}js中空数组是一个对象,可转型为true;php中空数组则为false。
2017-03-15 11:18:08
765
原创 explode将字符串打散成数组后的顺序问题
implode函数在手册的说明里有一句:Returns a string containing a string representation of all the array elements in the same order, with the glue string between each element.但是explode 中没有相关描述。我从网上找到了explode 的C实现源码,但
2017-03-09 09:49:48
923
原创 PHP类继承父类时,用类名做构造函数测试
突然想到 所以测试了下上代码class Dog extends Animal{ function say($word){ echo $word; }}class Animal{ function Animal($name){ echo $name; }}$dog = new Dog('wangcai');echo "<br>";
2017-03-02 09:52:24
418
thinkphp5.1完美集成gatewayworker
2018-05-07
thinkphp5整合gatewayworker windows版
2017-10-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅