-
php接口实现拖拽排序功能
[PHP教程] 2021-05-22 16:21:51 65人阅读
列表拖拽排序是一个很常见的功能,但是后端接口如何处理却是一个令人纠结的问题 如何实现才能达到效率最高呢? 先分析一个场景,假如有一个页面有十条数据,所谓的拖拽就是在这十条数据来来回回的拖,但是每次拖动都...[详细]
-
PHP设计模式之工厂方法设计模式实例分析
[PHP教程] 2021-05-22 16:21:14 54人阅读
本篇章节讲解PHP设计模式之工厂方法设计模式。供大家参考研究具体如下: 一、什么是工厂方法模式 作为一种创建型设计模式,工厂方法模式就是要创建“某种东西”。对于工厂方法,要创建的“东西”是一个产品,这个产...[详细]
-
原生php实现excel文件读写的方法分析
[PHP教程] 2021-05-22 16:18:04 146人阅读
本文实例分析了原生php实现excel文件读写的方法。供大家参考研究具体如下: 最近在工作中遇到一个需求,需要将数据库中的数据导出到excel文件中,并下载excel文件。因为以前没做过,所以就百度了一下,网上说的大多...[详细]
-
PHP设计模式之适配器模式原理与用法分析
[PHP教程] 2021-05-22 16:17:16 102人阅读
本篇章节讲解PHP设计模式之适配器模式原理与用法。供大家参考研究具体如下: 一、什么是适配器模式 适配器模式有两种:类适配器模式和对象适配器模式。其中类适配器模式使用继承方式,而对象适配器模式使用组合方式...[详细]
-
PHP设计模式之原型设计模式原理与用法分析
[PHP教程] 2021-05-22 16:15:48 62人阅读
本篇章节讲解PHP设计模式之原型设计模式原理与用法。供大家参考研究具体如下: 一、什么是原型设计模式 原型设计模式使用一种克隆技术来复制实例化的对象,新对象是通过复制原型实例创建的。原型设计模式的目的是通...[详细]
-
PHP注释:单行注释与多行注释的关系
[PHP教程] 2021-05-22 15:15:33 109人阅读
注释通常在 PHP 代码块中编写的,它是一个不可执行的部分,不会显示在输出结果中,在程序运行过程中会被解释器直接忽略。 规范的注释可以让我们的源代码更易于理...[详细]
-
PHP define还有const:定义常量
[PHP教程] 2021-05-22 15:14:58 177人阅读
除了可以使用 define() 函数之外,还可以使用 const 关键字来定义常量,const 关键字的语法如下: const 常量名 = 常量值; 下面通过示例来演示一下常量的使用:...[详细]
-
PHP魔术常量还有预定义常量
[PHP教程] 2021-05-22 15:12:33 162人阅读
下面列举了一些 PHP 中的预定义常量: PHP_VERSION:当前 PHP 的版本号; PHP_OS:当前的操作系统名称; PHP_EOL:系统换行符,Windows 是(\r\n),Linux 是(\...[详细]
-
PHP字符串运算符
[PHP教程] 2021-05-22 15:11:33 109人阅读
在表达式 2+1 中,运算符+有两个操作数,即 1 和 2。具有两个操作数的运算符可以称为双目运算符,具有一个操作数的运算符称为单目运算符。如表达式 -6,运算符-...[详细]
-
PHP逻辑运算符的原理
[PHP教程] 2021-05-22 15:10:57 185人阅读
左右两个条件同时为 TRUE 时,则结果为 TRUE;两个条件中有任意一个条件为 FALSE 时,则结果为 FALSE。当左边的条件为 FALSE 时,将直接跳过右边的条件直接返回...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]