-
PHP基于socket实现的简单客户端和服务端通讯功
[PHP教程] 2021-02-03 13:39:00 147人阅读
本篇章节讲解PHP基于socket实现的简单客户端和服务端通讯功能。供大家参考研究具体如下: 服务器端: 客户端: 更多关于PHP相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》、《》、《》及《》 希...[详细]
-
PHP正则匹配操作简单示例【preg_match_all应用
[PHP教程] 2021-02-03 13:36:37 171人阅读
本篇章节讲解PHP正则匹配操作。供大家参考研究具体如下: 幸福领地 一世情长 EOT;if(preg_match_all('% (.*?) %si',$str,$matches)) { $arr[0][] = $matches[1];}if(preg_match_all('/src="([^ /i',$matches)) { $ar...[详细]
-
php使用flock阻塞写入文件和非阻塞写入文件的实
[PHP教程] 2021-02-03 13:29:38 160人阅读
阻塞写入代码: (所有程序会等待上次程序执行结束才会执行,30秒会超时) $t1 = microtime(TRUE); if (flock($file,LOCK_EX)) { sleep(10); fwrite($file,"Write something"); flock($file,LOCK_UN); echo "Ok lock...[详细]
-
form自动提交实例讲解
[PHP教程] 2021-02-03 13:23:19 152人阅读
在做项目中,例如b2b的由商城跳往卖家中心的后台,当他既有会员账号又是卖家的时候,让他登录了商城,就不需要卖家登录的时候,处理过程中可以用到form表单自动登录。 实现简单思路:可以再普通会员登录的地方,登录...[详细]
-
php实现网页端验证码功能
[PHP教程] 2021-02-03 13:17:08 131人阅读
我们在实际开发中,会用到短信验证码以及网页验证码,相对来说网页验证码的成本比较低,安全系数也还可以,接下来我们就来做一个网页端的验证码,直接上代码: 首先来说一下文件目录结构: |----------phpyanzheng ...[详细]
-
阿里云PHP SMS短信服务验证码发送方法
[PHP教程] 2021-01-29 09:13:37 92人阅读
开通SMS服务 首先去这个网站开通阿里云的SMS短信服务: 创建签名、模板 要使用短信服务器需要先创建签名和模板,并提交给阿里云审核通过才可以正常使用短信服务。 创建签名 创建签名的时候注意一下签名名称,其他的...[详细]
-
PHP实现阿里大鱼短信验证的实例代码
[PHP教程] 2021-01-29 08:45:02 192人阅读
最近想实现PHP实现短信验证的效果,做PC网站的时候,可以通过注册用户需要使用短信验证的功能,或者找回密码,以及验证用户的信息等等功能,发现了阿里大鱼。留个笔记 第一步 登陆阿里大于注册账号,在用户管理中心...[详细]
-
yii2局部关闭(开启)csrf的验证的实例代码
[PHP教程] 2021-01-29 08:44:19 85人阅读
上一节主要是简单地说了一下关于yii2的防御csrf的攻击机制,接下来说一下关于如何全局和局部的开启使用csrf。 (1)全局使用,我们直接在配置文件中设置enableCookieValidation为true [ 'enableCookieValidation...[详细]
-
PHP实现登陆并抓取微信列表中最新一组微信消息
[PHP教程] 2021-01-29 08:43:45 97人阅读
本篇章节讲解PHP实现登陆并抓取微信列表中最新一组微信消息的方法。供大家参考研究具体如下: array( "wx_content...[详细]
-
PHP微信PC二维码登陆的实现思路
[PHP教程] 2021-01-29 08:29:41 136人阅读
一、思路: 思路关键在于如何与微信端交互起来,毕竟目前微信登录只能是在微信端。 但是微信有一个特殊的方法用于生成自定义的二维码,这就让我们能够在PC上显示二维码,而二维码的值可以是我们定义的。另外看微信开...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]