-
PHP实现超简单的SSL加密解密、验证及签名的方法
[PHP教程] 2021-03-06 21:46:14 163人阅读
本篇章节讲解PHP实现超简单的SSL加密解密、验证及签名的方法。供大家参考研究具体如下: 1. sign签名代码: 2. verify 验证代码: 3. 解密代码 PS:关于加密解密感兴趣的朋友还可以参考本站在线工具: 文字在线加密...[详细]
-
基于PHP的加载类操作以及其他两种魔术方法的应
[PHP教程] 2021-03-06 21:46:14 96人阅读
实例如下所示: 加载类 //include("./Ren.class.php"); //include "./Ren.class.php"; include_once("./Ren.class.php"); include_once("./Ren.class.php"); $f = new Ren(); $f-test(); require("./Ren.class.php")...[详细]
-
PHP大文件分割上传 PHP分片上传
[PHP教程] 2021-03-06 21:46:14 92人阅读
服务端为什么不能直接传大文件?跟php.ini里面的几个配置有关 当然不能简单粗暴的把上面几个值调大,否则服务器内存资源吃光是迟早的问题。 解决思路 好在HTML5开放了新的FILE API,也可以直接操作二进制对象,我们...[详细]
-
PHP迭代与递归实现无限级分类
[PHP教程] 2021-03-06 21:46:14 92人阅读
无限级分类是开发中常见的情况,因此本文对常见的无限极分类算法进行总结归纳. 1.循环迭代实现 ['id...[详细]
-
PHP单例模式与工厂模式详解
[PHP教程] 2021-03-06 21:44:48 126人阅读
一、单例模式又称为职责模式,它用来在程序中创建一个单一功能的访问点,通俗地说就是实例化出来的对象是唯一的。所有的单例模式至少拥有以下三种公共元素: 1. 它们必须拥有一个构造函数,并且必须被标记为private2...[详细]
-
php实现支持中文的文件下载功能示例
[PHP教程] 2021-03-06 21:44:29 192人阅读
前言 本文主要给大家介绍了关于php实现支持中文的文件下载功能的相关内容,分享出来供大家参考学习,下面话不多说了,来一起看看详细的介绍吧。 问题说明 文件下载,通常有一种最为简单的方法,那就是将url直接指向...[详细]
-
php token使用与验证示例【测试可用】 #60;font
[PHP教程] 2021-03-06 21:44:07 131人阅读
本篇章节讲解php token使用与验证。供大家参考研究具体如下: 一、token功能简述 PHP 使用token验证可有效的防止非法来源数据提交访问,增加数据操作的安全性 二、实现方法: 前台form表单: "/ "/ "/ 后台do.php的t...[详细]
-
利用PHP访问MySql数据库的逻辑操作以及增删改查
[PHP教程] 2021-03-06 21:43:32 50人阅读
PHP访问MySql数据库 //写SQL语句 $sql = "select * from student"; //检测连接数据库是否成功,失败返回“连接失败”,并退出程序 if(mysqli_connect_error()){ die("连接失败"); } //执行SQL语句,返回结果集对象 $r...[详细]
-
php实现与python进行socket通信的方法示例
[PHP教程] 2021-03-06 15:56:13 194人阅读
本篇章节讲解php实现与python进行socket通信的方法。供大家参考研究具体如下: 设计目的 通过前端页面发起请求交给php,php创建socket请求交给Python脚本,然后执行完毕之后,返回给前端。 index.html test service ...[详细]
-
PHP Socket网络操作类定义与用法示例
[PHP教程] 2021-03-06 15:56:13 153人阅读
本篇章节讲解PHP Socket网络操作类定义与用法。供大家参考研究具体如下: web前端测试: test mysocket.php: conn = socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) conn)."\n...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]