-
php实现的AES加密类定义与用法示例
[PHP教程] 2021-03-31 14:46:12 95人阅读
本篇章节讲解php实现的AES加密类定义与用法。分享给大家供大家参考,具体如下: CryptAES.class.php文件: cipher = $cipher; } public function set_mode($mode) { $this->mode = $mode; } public function set_iv(...[详细]
-
php 判断IP为有效IP地址的方法
[PHP教程] 2021-03-31 14:45:35 89人阅读
多数人看到这篇日志,第一印象肯定是以为是要讲如何通过正则表达式来判断。 非也,在php5.2.0之后,有专门的函数来做这个判断了。 判断是否是合法IP 判断是否是合法的IPv4 IP地址 判断是否是合法的公共IPv4地址,192...[详细]
-
win10 apache配置虚拟主机后localhost无法使用
[PHP教程] 2021-03-31 14:41:02 193人阅读
win10系统配置虚拟主机 1.用记事本或Sublime Text打开httpd.conf ctrl + f 搜索httpd-vhosts.conf 将 2.打开extra/httpd-vhosts.conf 添加如下内容: ServerAdmin webmaster@youremail.comDocumentRoot "E:/your_web...[详细]
-
PHP 记录访客的浏览信息方法
[PHP教程] 2021-03-31 14:40:09 197人阅读
可以记录访客的地理位置,操作系统,浏览器,IP,时间和访问的文件。 1.首先创建一个comm_function.php文件: ".$_SERVER ['REMOTE_ADDR'];/** * 获取客户端类型,手机还是电脑,以及相应的操作系统类型。 * * @para...[详细]
-
PHP+Redis 消息队列 实现高并发下注册人数统计
[PHP教程] 2021-03-31 14:36:48 92人阅读
前言 现在越来越多的网站开始注重统计和用户行为分析,作为网站经常使用的功能,如何让统计性能更加高,这也是我们需要考虑的事情。本篇通过Redis来优化统计功能(以注册人数统计为例)。 传统的统计功能都是直接操...[详细]
-
PHP 使用二进制保存用户状态的实例
[PHP教程] 2021-03-31 06:31:03 64人阅读
前言 用户状态保存是一个很常见的需求,一般用来保存用户状态的方式是在数据库表中创建多个字段来存储相应的用户状态,比如要保存用户是否绑定了手机号和QQ,则需要2个字段(mobile,qq)来保存。 如果使用二进制来保存...[详细]
-
Ubuntu上安装yaf扩展的方法
[PHP教程] 2021-03-31 06:29:04 158人阅读
一、下载 yaf扩展下载地址 http://pecl.php.net/package/yaf 选择你想要下载的包 二、安装 解决方法: 最后一条命令时可能出现错误:compilation terminated. make: * [yaf_router.lo] Error 1 再执行最后一条命令。...[详细]
-
PHP运用foreach神奇的转换数组(实例讲解)
[PHP教程] 2021-03-31 06:23:44 175人阅读
要求: 将二维数组$arr转换为以‘time'和‘type'为下标、‘data‘为值的二维数组; 原数组: array( 'data...[详细]
-
PHP双向链表定义与用法示例
[PHP教程] 2021-03-31 06:22:28 141人阅读
本篇章节讲解PHP双向链表定义与用法。供大家参考研究具体如下: 由于需要对一组数据多次进行移动操作,所以写个双向链表。但对php实在不熟悉,虽然测试各个方法没啥问题,就是不知道php语言深层的这些指针和unset有...[详细]
-
php学习笔记之mb_strstr的基本使用
[PHP教程] 2021-03-31 06:21:24 196人阅读
前言 本文主要介绍了关于php之mb_strstr基本使用的相关内容,分享出来供大家参考学习,下面话不多说了,来一起看看详细的介绍吧。 mb_strstr (PHP 5 >= 5.2.0,PHP 7) mb_strstr — Finds first occurrence of a stri...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]