-
CI框架(CodeIgniter)操作redis的方法详解
[PHP教程] 2021-03-31 15:03:31 148人阅读
本篇章节讲解CI框架(CodeIgniter)操作redis的方法。供大家参考研究具体如下: 1. 在autoload.php 中加入 如下配置行 2. 在/application/config 中加入文件 redis.php 文件内容如下: 3. 在 /application/libraries ...[详细]
-
PHP开发之用微信远程遥控服务器
[PHP教程] 2021-03-31 15:01:18 59人阅读
摘要 微信公众好的开发很火,小程序更火。于是也凑个热闹,尝试了一把。 大致的功能还是有的,不过是不全,很多地方我没有进行处理。不过对于纯文本方式的交流,已经没有问题啦。 p style="text-align: center" 环境...[详细]
-
php实现统计二进制中1的个数算法示例
[PHP教程] 2021-03-31 14:54:32 173人阅读
本篇章节讲解php实现统计二进制中1的个数算法。供大家参考研究具体如下: 问题 输入一个十进制整数,输出该数二进制表示中1的个数。其中负数用补码表示。 解决思路 这是个位运算的题目。解法一:可以通过按位与操作...[详细]
-
基于php中echo用逗号和用点号的区别详解
[PHP教程] 2021-03-31 14:53:18 138人阅读
实例如下: "; echo '1+5='."1+5"." "; echo '1+5='."5+1"," "; echo '1+5=',1," "; //用逗号,不需要空格 echo '1+5='. 1," "; //用连接符,需要空格,否则报错 echo '1+5=',100+200," "; //用逗号,常用于输出多个...[详细]
-
PHP设计模式之注册树模式分析
[PHP教程] 2021-03-31 14:50:36 66人阅读
本篇章节讲解PHP注册树模式。供大家参考研究具体如下: 什么是注册树模式? 注册树模式当然也叫注册模式,注册器模式。之所以我在这里矫情一下它的名称,是因为我感觉注册树这个名称更容易让人理解。像前两篇一样,...[详细]
-
PHP微信开发之微信录音临时转永久存储
[PHP教程] 2021-03-31 14:49:16 126人阅读
最近做开发的时候碰到了这个问题,甲方希望用户在微信端的录音能够一直有效。就是随时打开好友的分享就能听到好友的录音。可在微信官方开发手册上查到微信录音文件上传后只能在微信端保留3天时间,3天后就失效了。怎...[详细]
-
PHP CURL与java http使用方法详解
[PHP教程] 2021-03-31 14:48:49 131人阅读
php curl 有时候我们的项目需要与第三方平台进行交互。举个例子。 现在有A、B两个平台。 甲方在最初一段时间由A实现了一部分关键业务(如用户信息等)。 然后基于一部分原因,现在有一些业务需要B来实现,且实现程序...[详细]
-
php实现mysql连接池效果实现代码
[PHP教程] 2021-03-31 14:48:12 70人阅读
循环从mysql连接池中获取连接,不需要重复创建新的连接。 参考配置修改:可以参考下面的文章 防止访问量过大,把连接数占满了 /** @author xuleyan @title mysql类 */ class DbHelper{ //连接池 private $_pools = [...[详细]
-
php使用imagecopymerge()函数创建半透明水印
[PHP教程] 2021-03-31 14:47:19 62人阅读
使用创建半透明水印,供大家参考,具体内容如下 // 首先我们从 GD 手动创建水印图像 $stamp = imagecreatetruecolor(100,70); imagefilledrectangle($stamp,99,69,0x0000FF); imagefilledrectangle($stamp,9,90,60,0...[详细]
-
PHP实现的防止跨站和xss攻击代码【来自阿里云】
[PHP教程] 2021-03-31 14:46:45 74人阅读
本篇章节讲解PHP实现的防止跨站和xss攻击代码。供大家参考研究具体如下: 文档说明: 1.将waf.php传到要包含的文件的目录 2.在页面中加入防护,有两种做法,根据情况二选一即可: a).在所需要防护的页面加入代码 就...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]