-
PHP通过bypass disable functions执行系统命令
[PHP教程] 2021-05-18 19:44:57 104人阅读
一、为什么要bypass disable functions 为了安全起见,很多运维人员会禁用PHP的一些“危险”函数,例如eval、exec、system等,将其写在php.ini配置文件中,就是我们所说的disable functions了,特别是虚拟主机运营商...[详细]
-
购物车实现的几种方式优缺点对比
[PHP教程] 2021-05-18 19:44:16 199人阅读
购物车的话目前来说有三种,分别是存储在cookie中或是session中,或是结合 数据库存储 第一种是存储在cookie中 优点: 1.cookie是存储在客户端的,且占用很少的资源,一般cookie中可以存储300个cookie,每个cookie为4KB,既...[详细]
-
PHP生成(支持多模板)二维码海报代码
[PHP教程] 2021-05-18 18:45:44 141人阅读
增加模板: 1、qrcode.*** 开头的 文件夹,比如:qrcode.demoABC 2、在第一步创建的文件夹中配置文件config.php,以上面的例子为:qrcode.demoABC/config.php return array( //二维码部分 'level' = "L",//二维码校...[详细]
-
PHP中PDO事务处理操作示例
[PHP教程] 2021-05-18 18:22:12 170人阅读
本篇章节讲解PHP中PDO事务处理操作。供大家参考研究具体如下: 概要: 将多条sql操作(增删改)作为一个操作单元,要么都成功,要么都失败。 单条数据不用事务处理 被操作的表必须是innoDB类型的表(支持事务) MySQ...[详细]
-
PHP简单实现解析xml为数组的方法
[PHP教程] 2021-05-18 18:11:11 63人阅读
本篇章节讲解PHP简单实现解析xml为数组的方法。供大家参考研究具体如下: 最近想要做一个插件机制,需要用到xml,在解析xml时候需要转换为数组,特意记录一个此种解析方式 xmlDemo.xml文件: php代码: 运行结果: a...[详细]
-
PHP实现动态压缩js与css文件的方法
[PHP教程] 2021-05-18 17:33:51 170人阅读
本篇章节讲解PHP实现动态压缩js与css文件的方法。供大家参考研究具体如下: 正式发布产品时,我们希望将项目里的js,css合并压缩,以减少http请求、防止轻易查看源代码。 使用 只需要在头部引入一下代码即可: demo ...[详细]
-
Yii2框架数据验证操作实例详解
[PHP教程] 2021-05-18 17:09:59 170人阅读
本篇章节讲解Yii2框架数据验证操作。供大家参考研究具体如下: 一、场景 什么情况下需要使用场景呢?当一个模型需要在不同情境中使用时,若不同情境下需要的数据表字段和数据验证规则有所不同,则需要定义多个场景来...[详细]
-
PHP中cookie知识点学习
[PHP教程] 2021-05-18 17:09:26 129人阅读
什么是cookie cookie,即小饼干,是保存在用户代理端(浏览器是最常见的用户代理)的一些数据片段。浏览网页时,浏览器会将 当前页面有效的 cookie放在请求的头部发送到服务端。 cookie组成 cookie由以下几部分组成...[详细]
-
分析php://output和php://stdout的区别
[PHP教程] 2021-05-18 17:08:48 92人阅读
PHP包含了以php://开头的一系列输出输出流,如php://stdin,php://stdout等。今天查看代码时,忽然想到一个问题:php://output和php://stdout有什么区别? 从PHP的官方文献中找答案,对输入流php://stdin和php://inpu...[详细]
-
PHP 布尔值的自增与自减的实现方法
[PHP教程] 2021-05-18 17:07:30 93人阅读
在上午和业务需求战斗结束之后,准备打开群看看各位老司机有没有看车,突然看到 @E舞九天 II 发的一些消息 他发现,PHP 的布尔值自增,无论自增多少遍,最后输出的都是 1 这就比较有趣了~ 自增和自减,++$a 和 $a++ ...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]