-
php怎样发布扩展信息
[PHP教程] 2022-07-27 13:12:26 79人阅读
扩展可以发布 phpinfo() 或反射API要求的信息。我们一起来看一下。 本章不会太长,因为真的很简单。 MINFO( ) 挂钩 如果声明了,一切都在声明的 MINFO() 挂钩中进行。如果未声明,则引擎将运行默认功能以打印有关扩...[详细]
-
教你php如何进行内存调试
[PHP教程] 2022-07-27 13:10:52 79人阅读
本章是有关PHP源代码的内存调试的简要介绍。 这不是一门完整的课程:内存调试并不难, 但是你需要一些它的使用经验,大量的练习可能是你在设计任何C编写的代码时都必须要做的事情。我们将在这里介绍一个非常著名的内存...[详细]
-
了解PHP爬取网页的主要方法
[PHP教程] 2022-07-27 13:10:14 189人阅读
主要流程就是获取整个网页,然后正则匹配(关键的)。 PHP抓取页面的主要方法,有几种方法是网上前辈的经验,现在还没有用到的,先存下来以后试试。 1.file()函数 2.file_get_contents()函数 3.fopen()-fread()-fclos...[详细]
-
直击php中static,const与define的使用差别
[PHP教程] 2022-07-27 13:09:32 53人阅读
define部分: 宏不仅可以用来代替常数值,还可以用来代替表达式,甚至是代码段。(宏的功能很强大,但也容易出错,所以其利弊大小颇有争议。) 宏的语法为: #define 宏名称 宏值 作为一种建议和一种广大程序员共同...[详细]
-
实例解析php提交表单关闭layer弹窗iframe
[PHP教程] 2022-07-27 13:08:54 98人阅读
介绍一款非常好用的前端弹窗插件: 根据官方的API:layer的iframe弹窗 //iframe层-父子操作 layer.open({ type: 2, area: [700px, 530px], fix: false, //不固定 maxmin: true, content: test/iframe.html }); 这里...[详细]
-
实例详解在PHP中$POST的$GET的用法和区别
[PHP教程] 2022-07-27 13:08:16 183人阅读
post和get是指页面提交的两种方式。 get:参数都体现在url上,可以用于翻页,简单查询,get只能接收2M以下的内容,所以有局限性,另外由于内容是可见的,安全性就下降了。 post:用于页面表单提交,上传文件。大小没...[详细]
-
PHP-fpm占CPU 100%修补
[PHP教程] 2022-07-27 13:07:54 68人阅读
记录一次 php-fpm 占 cpu 100% 修复 问题描述: 经业务人员反馈,前台页面返回 502 错误,上服务器查询发现,有俩个 php-fpm 占 cpu 100%, 重启 php-fpm 无效。 解决方法: 1. 通过 top 查找占 cpu 100% 的进程 id,...[详细]
-
php保留两位小数的几种方法说明
[PHP教程] 2022-07-27 13:07:24 68人阅读
php保留两位小数的几种方法介绍 1.不进位的情况 比如3.149569取小数点后两位,最后两位不能四舍五入。结果:3.14。 可以使用 floor 函数 该函数是舍去取整。例如,floor(4.66456) 结果:4 。 floor(9.1254) 结果9 。...[详细]
-
PHP如何使用mpdf将html页面转化pdf文件?
[PHP教程] 2022-07-27 13:06:48 112人阅读
本文主要需求是将html页面转换为pdf文档 1、安装mpdf工具类 (composer方式) composer require mpdf/mpdf:8.0.3 2、控制器里调用 ?php public function test_pdf(){ //$mpdf = new \Mpdf\Mpdf(); $mpdf = new \Mpdf...[详细]
-
PHP该如何解压缩zip文件?代码示例
[PHP教程] 2022-07-27 13:06:06 113人阅读
PHP解压缩zip文件 1、使用PHP执行文件解压缩zip文件,前提条件,一定要确定服务器开启了zip拓展 2、封装的方法如下: 实例代码: ?php /** * 压缩文件 * @param array $files 待压缩文件 array(d:/test/1.txt,d:/te...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]