-
phpcms实现验证码替换及phpcms实现全站搜索功能
[PHP教程] 2021-03-30 15:49:45 133人阅读
在使用phpcms替换网页的时候,除了正常的替换栏目、内容页等,其他的什么验证码啦,提交表单了,搜索功能了,这些在替换的时候可能会对一些默认文件有一些小小 的改变 下面就是自己在失败中成功的过程,最后终于替换...[详细]
-
实例分析PHP中PHPMailer发邮件
[PHP教程] 2021-03-30 15:47:58 183人阅读
下面以QQ邮箱为例,按照这四个方面来介绍PHPMaIiler的使用: PHPMailer的介绍步骤一:使QQ邮箱能够发送邮件步骤二:使PHP能够使用QQ邮箱发送邮件步骤三:编写发送邮件代码 ThinkPHP使用PHPMailer 发送邮件 PHPMailer...[详细]
-
使用XHProf查找PHP性能瓶颈的实例
[PHP教程] 2021-03-30 15:46:52 120人阅读
XHProf是facebook 开发的一个测试php性能的扩展,本文记录了在中使用XHProf对PHP进行性能优化,查找性能瓶颈的方法。 一、安装Xhprof扩展 二、修改php.ini 配置中xhprof.output_dir指定了生成的profile文件存储的位...[详细]
-
PHP实现数组的笛卡尔积运算示例
[PHP教程] 2021-03-30 15:46:14 83人阅读
本篇章节讲解PHP实现数组的笛卡尔积运算。分享给大家供大家参考,具体如下: 数组的笛卡尔积在实际中还是挺有用处的,比如计算商品的规格时就经常用到,下面写一种实现方式,如下代码 以上例子输出的结果如下: Arra...[详细]
-
PHP中OpenSSL加密问题整理
[PHP教程] 2021-03-30 15:45:35 90人阅读
最近公司项目中有需要用到OpenSSL的加密和java端进行接口验证,再测试环境升级到PHP7的时候加密会出现错误,后来多方面检查终于找到原因所在: PHP7环境下把openssl_get_privatekey方法换成openssl_pkey_get_private...[详细]
-
利用PHP判断是手机移动端还是PC端访问的函数示
[PHP教程] 2021-03-30 15:37:31 96人阅读
前言 最近在开发项目的时候,分别开发了PC端和手机端,需要实现,用手机访问PC端WWW域名的时候,自动判断跳转到移动端,用电脑访问M域名手机网站的时候,自动跳转到PC端网站,于是有了下面这个判断函数: 示例代码:...[详细]
-
PHP递归实现快速排序的方法示例
[PHP教程] 2021-03-30 15:37:00 163人阅读
本篇章节讲解PHP递归实现快速排序的方法。供大家参考研究具体如下: 首先我们要理解一下 快速排序的原理 : 不难发现,这里符合递归的原理,所以我们可以用递归来实现。 使用递归,则需要找到递归点和递归出口: 递...[详细]
-
PHP结合Vue实现滚动底部加载效果
[PHP教程] 2021-03-30 08:08:51 116人阅读
前言 最近的一个项目手机端分页跳转不理想,自己做了一个滚动加载的一个Demo,下面话不多说了,来一起看看详细的介绍吧。 实现思路 1.获得滚动条到底部的距离 getScrollBottomHeight() 2.绑定滚动事件 handleScroll(...[详细]
-
浅谈PHP实现大流量下抢购方案
[PHP教程] 2021-03-30 08:07:04 145人阅读
要求要有小时分钟秒的实时倒计时的显示,用户端修改日期时间不会影响到倒计时的正常显示(也就是以服务器时间为准)。 其实这和很多的考试等系统的时间限制功能同样的要求。 总不能用ajax每秒都获取服务器时间吧,所...[详细]
-
PHP7下协程的实现方法详解
[PHP教程] 2021-03-30 08:07:03 167人阅读
前言 相信大家都听说过『协程』这个概念吧。 但是有些同学对这个概念似懂非懂,不知道怎么实现,怎么用,用在哪,甚至有些人认为yield就是协程! 我始终相信,如果你无法准确地表达出一个知识点的话,我可以认为你就...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]