-
php通过pecl方式安装扩展的实例讲解
[PHP教程] 2021-03-31 06:20:41 143人阅读
1、安装pecl及创建快捷键(若安装php时已带可忽略这步安装步骤) 2、查询是否已经收录了该扩展 3、安装配置扩展 配置php.ini引用swoole.so然后重启php即可 注: 相比于phpize方式安装,pecl方式安装更为简便,可省去...[详细]
-
php 删除一维数组中某一个值元素的操作方法
[PHP教程] 2021-03-31 06:18:27 138人阅读
1. 自己写for循环 从array里去掉$tmp这个元素的值 '321','1...[详细]
-
PHP实现QQ登录的开原理和实现过程
[PHP教程] 2021-03-31 06:17:06 109人阅读
第三方登录,就是使用大家比较熟悉的比如QQ、微信、微博等第三方软件登录自己的网站,这可以免去注册账号、快速留住用户的目的,免去了相对复杂的注册流程。下边就给大家讲一下怎么使用PHP开发QQ登录的功能。 1、进...[详细]
-
PHP实现正则表达式分组捕获操作示例
[PHP教程] 2021-03-31 06:16:31 103人阅读
本篇章节讲解PHP实现正则表达式分组捕获操作。供大家参考研究具体如下: 经过测试,发现php正则表达式获取分组捕获是从$0开始,而平时工作中JavaScript中的正则是$1..$9 在提取项目代码中的汉字时,因为当时操作速度...[详细]
-
php实现解析xml并生成sql语句的方法
[PHP教程] 2021-03-31 06:15:50 138人阅读
本篇章节讲解php实现解析xml并生成sql语句的方法。供大家参考研究具体如下: php解析xml有很多种办法,文档中有,搜索一下就一大把的。 今天遇到一个需求:将某个xml中的节点属性提取出来,然后更新数据库某一表中的...[详细]
-
PHP删除数组中指定下标的元素方法
[PHP教程] 2021-03-31 06:15:19 57人阅读
1、前面有讲数组作为堆栈和队列时的删除元素操作,即按顺序有规律的进行删除。那么,如果需要从数组的中间位置删除某个元素该如何操作呢?就需要我们今天要讲的unset()函数了。 2、unset()函数允许取消一个数组中的...[详细]
-
浅析PHP开发规范
[PHP教程] 2021-03-31 06:14:56 139人阅读
基本约定 源文件 代码使用 文件格式必须是无BOM UTF-8格式 一个文件只声明一种类型,如class和interface不能混写在一个源文件中 缩进 使用4个空格来缩进,IDE可以设置 行长度 每行120个字符 关键字 所有关键字均为小...[详细]
-
linux下的php-fpm参数配置介绍与参数优化说明
[PHP教程] 2021-03-30 23:06:49 161人阅读
php-fpm.conf重要参数详解 php-fpm参数调优 表示使用哪种进程数量管理方式 如果pm为static,那么其实只有pm.max_children这个参数生效。系统会开启设置数量的php-fpm进程 如果pm为dynamic,那么pm.max_children参数失...[详细]
-
PHP 闭包获取外部变量和global关键字声明变量的
[PHP教程] 2021-03-30 23:05:51 148人阅读
最近在学习workerman的时候比较频繁的接触到回调函数,使用中经常会因为worker的使用方式不同,会用这两种不同的方式去调用外部的worker变量,这里就整理一下PHP闭包获取外部变量和global关键字声明变量的区别。 闭...[详细]
-
用好anyproxy提高公众号文章采集效率
[PHP教程] 2021-03-30 22:46:36 99人阅读
影响因素主要会有以下几点: 1、网络环境不佳; 2、手机或模拟器中微信客户端崩溃; 3、其它一些网络传输错误; 因为我比较看重采集系统的运行成本,这个成本包括硬件投入,运算力投入和占用的人工精力。所以必须提...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]