-
PHP7扩展开发之hello word实现方法详解
[PHP教程] 2021-04-01 05:34:12 59人阅读
本篇章节讲解PHP7扩展开发之hello word实现方法。供大家参考研究具体如下: 这里是以PHP7作为基础,讲解如何从零开始创建一个PHP扩展。本文主要讲解创建一个扩展的基本步骤都有哪些。示例中,我们将实现如下功能: ...[详细]
-
基于 Swoole 的微信扫码登录功能实现代码
[PHP教程] 2021-04-01 05:33:18 189人阅读
随着微信的普及,扫码登录方式越来越被现在的应用所使用。它因为不用去记住密码,只要有微信号即可方便快捷登录。微信的开放平台原生就有支持扫码登录的功能,不过大部分人还是在用公众平台,所以扫码登录只能自行实...[详细]
-
详解PHP序列化和反序列化原理
[PHP教程] 2021-04-01 05:32:28 169人阅读
0.前言 对象的序列化和反序列化作用就不再赘述,php中序列化的结果是一个php自定义的字符串格式,有点类似json. 我们在任何语言中设计对象的序列化和反序列化都需要解决几个问题 把某个对象序列化之后,序列化的结果有...[详细]
-
PHP实现可添加水印与生成缩略图的图片处理工具
[PHP教程] 2021-04-01 05:31:15 104人阅读
本篇章节讲解PHP实现可添加水印与生成缩略图的图片处理工具类。分享给大家供大家参考,具体如下: ImageTool.class.php imagePath = $imagePath; $this->outputDir = $outputDir; $this->memoryImg = null; } /** * ...[详细]
-
PHP实现找出链表中环的入口节点
[PHP教程] 2021-04-01 05:30:39 54人阅读
本篇章节讲解PHP实现找出链表中环的入口节点。供大家参考研究具体如下: 问题 一个链表中包含环,请找出该链表的环的入口结点。 解决思路 第一步,找环中相汇点。分别用p1,p2指向链表头部,p1每次走一步,p2每次走...[详细]
-
PHP实现从上往下打印二叉树的方法
[PHP教程] 2021-03-31 21:18:01 120人阅读
本篇章节讲解PHP实现从上往下打印二叉树的方法。供大家参考研究具体如下: 问题 从上往下打印出二叉树的每个节点,同层节点从左至右打...[详细]
-
PHP获取链表中倒数第K个节点的方法
[PHP教程] 2021-03-31 21:17:22 107人阅读
本篇章节讲解PHP获取链表中倒数第K个节点的方法。供大家参考研究具体如下: 问题 输入一个链表,输出该链表中倒数第k个结点。 解决思路 注意这个题目是返回节点,而不是返回值。返回值的话可以用栈来存储。返回节点...[详细]
-
PHP获取二叉树镜像的方法
[PHP教程] 2021-03-31 21:15:45 65人阅读
本篇章节讲解PHP获取二叉树镜像的方法。供大家参考研究具体如下: 问题 操作给定的二叉树,将其变换为源二叉树的镜像。 解决思路 翻转二叉树,有递归和非递归两种方式,非递归就是使用队列。 实现代码 val = $val; }...[详细]
-
PHP实现按之字形顺序打印二叉树的方法
[PHP教程] 2021-03-31 21:13:18 51人阅读
本篇章节讲解PHP实现按之字形顺序打印二叉树的方法。供大家参考研究具体如下: 问题 请实现一个函数按照之字形打印二叉树,即第一行按照从左到右的顺序打印,第二层按照从右至左的顺序打印,第三行按照从左到右的顺...[详细]
-
php实现的mongoDB单例模式操作类
[PHP教程] 2021-03-31 21:12:45 78人阅读
本篇章节讲解php实现的mongoDB单例模式操作类。供大家参考研究具体如下: 看了好多mongo类都不尽人意。最后发现根本不需要自己封装类。php mongo 的扩展自带的方法就已经很方便了 但是习惯性的把数据库连接部分封装...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]