-
php curl随机ip地址抓取内容实例
[PHP教程] 2022-02-23 15:50:01 94人阅读
curl是一个特别牛逼的东西!~ 居然还可以生成随机的ip来访问,只可以让服务器非别不出真实ip。这个很6!有人说这个是不算bug的bug。不过有这个功能也给我们带来了很大的方便。 php curl 随机ip访问: function curl($...[详细]
-
PHP多种序列化和反序列化例子
[PHP教程] 2022-02-23 15:49:26 162人阅读
序列化是将变量转换为可保存或传输的字符串的过程;反序列化就是在适当的时候把这个字符串再转化成原来的变量使用。这两个过程结合起来,可以轻松地存储和传输数据,使程序更具维护性。 1. serialize和unserialize函...[详细]
-
php并发控制里的独占锁的例子
[PHP教程] 2022-02-23 15:48:53 73人阅读
1.并发问题 并发大家都知道是什么情况,这里说的是并发多个请求抢占同一个资源,直接上实例吧 请求:index.php?mod=aaction=btaskid=6 处理: $key = a_b::.$uid._.$taskid; $v = $redis-get($key); if($v == 1){ $re...[详细]
-
php apidoc生成接口文档实例
[PHP教程] 2022-02-23 15:48:19 158人阅读
api 生成接口文档示例: { name: 9月份赠险领取分享活动微信接口, version: 1.0.0, description: 9月份赠险领取分享活动微信接口文档 (t=1) , sampleUrl : http://www.Cuoxin.com/ } 另存文件名为:apidoc.json apid...[详细]
-
Php里钩子 Hook 的应用例子
[PHP教程] 2022-02-23 15:47:43 127人阅读
我们先来回顾下原本的开发流程;产品汪搞出了一堆需求;当用户注册成功后需要发送短信、发送邮件等等; 然后聪明机智勇敢的程序猿们就一扑而上;把这些需求转换成代码扔在 用户注册成功 和 跳转到首页 之间;没有什...[详细]
-
PHP Opcode缓存加速组件 APC详解说明
[PHP教程] 2022-02-23 15:47:11 134人阅读
PHP在性能上相对于其他编译型语言来说算不上突出,但是使用了Opcode缓存后性能提升还是很明显的。常见的缓存加速组件主要有 eAccelerator,XCache,APC本文主要介绍APC的安装使用。 APC,全称是Alternative PHP Cache...[详细]
-
php和c实现按行读取文件实例代码
[PHP教程] 2022-02-23 15:46:31 59人阅读
php与c 实现按行读取文件 前言:感觉很糟糕的一场电话一面竟然给了二面通知,好吧,给自己一个机会也给对方一次机会,题外话。海量数据处理经常涉及到hash将原来文件的每一行散列到子文件中,那如何按行读取文件呢,...[详细]
-
php单元测试phpunit入门实例方法
[PHP教程] 2022-02-23 15:45:32 112人阅读
这篇文章提供了一些phpunit官方教程没有提到的信息,帮助初学者快速了解php单元测试,在phpunit官网提供了详细的中文教程,可选多种格式下载. phpunit官网地址:https://phpunit.de/ 何为单元测试: 指对软件中的基...[详细]
-
PHP提示Class SoapClient not found错误怎么解
[PHP教程] 2022-02-23 15:45:10 186人阅读
要用到 SoapClient, new 了一个提示 Class SoapClient not found, 检查了下 phpinfo, 原因是当初没有编译这个扩展, 只好现在再加上了。 php在调用webservice时,报告如下类似错误: ( ! ) Fatal error: Class SoapCl...[详细]
-
php获得一个文件夹的mtime的程序
[PHP教程] 2022-02-23 15:43:58 53人阅读
php很容易获取到一个文件夹的mtime,可以使用filemtime函数。但文件夹的filemtime由于linux的原因。文件修改时,只会影响他当前的文件夹mtime变化。并不会继续影响文件夹上层的文件夹。所以可能跟真正想得到的文件夹...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]