-
PHP利用Cookie落地自动登陆
[PHP教程] 2021-05-21 23:03:22 57人阅读
要实现自动登录功能我们大多是利用浏览器的 Cookie 来实现。实现思路是在用户登陆成功后使用 Cookie 来保存用户的登陆信息,并在 PHP 脚本中跟踪登录用户的信息...[详细]
-
PHP异常处理教学篇
[PHP教程] 2021-05-21 23:02:27 186人阅读
异常处理的加入使得在 PHP 程序中排查错误、捕获异常更加简单容易,也使得 PHP 程序在健壮性方面有很大改善和提高。异常处理在 PHP 中的具体体现就是,PHP 提供...[详细]
-
分析PHP错误类型
[PHP教程] 2021-05-21 22:46:26 190人阅读
语法错误是在编程中最容易碰到也是最容易解决的一种错误,例如:遗漏一个分号时就会显示错误信息。这种错误会停止程序的执行,并显示出错信息。我们可以根据错误...[详细]
-
PHP错误日志的配置和小技巧
[PHP教程] 2021-05-21 22:44:49 176人阅读
我们可以在单独的文本文件中将错误报告作为日志记录。错误日志的记录,可以帮助开发人员或者管理人员查看系统是否存在问题。如果需要将程序中的错误报告写入错误...[详细]
-
PHP set_error_handler包含的自定义BUG处理函数
[PHP教程] 2021-05-21 22:43:13 196人阅读
用户自定义函数的格式如下: error_handler(int $errno , string $errstr [, string $errfile [, int $errline [, array $errcontext ]]]) 其中: 第一个参数 $e...[详细]
-
PHP如何避免错误
[PHP教程] 2021-05-21 22:20:56 184人阅读
PHP 中屏蔽错误的方法有 3 中,下面就来分别介绍一下。 1、使用错误控制运算符:@ PHP 支持使用错误控制运算符 @ 。将其放置在一个 PHP 表达式之前,该表达式可...[详细]
-
PHP7中的错误改正
[PHP教程] 2021-05-21 22:20:24 150人阅读
这种 Error 异常可以像 Exception 异常一样被第一个匹配的 try catch 语句块所捕获。如果没有匹配的 catch 语句块,则调用异常处理函数(事先通过 set_exception...[详细]
-
PHP连接数据库的方法
[PHP教程] 2021-05-21 22:19:45 123人阅读
在此之前,我们需要确保开启了 PHP 中的 mysqli 扩展。以 Windows 系统为例,开启 mysqli 扩展就是将 php.ini 配置文件中 extension=mysqli (php7)或 extensio...[详细]
-
PHP实现通过strace定位故障原因的方法
[PHP教程] 2021-05-18 23:03:03 107人阅读
本篇章节讲解PHP实现通过strace定位故障原因的方法。供大家参考研究具体如下: 俗话说:不怕贼偷,就怕贼惦记着。在面对故障的时候,我也有类似的感觉:不怕出故障,就怕你不知道故障的原因,故障却隔三差五的找上门...[详细]
-
PHP性能测试工具xhprof安装与使用方法详解
[PHP教程] 2021-05-18 23:02:11 169人阅读
本文实例分析了PHP性能测试工具xhprof安装与使用方法。供大家参考研究具体如下: xhprof概述: XHProf是一个分层PHP性能分析工具。它报告函数级别的请求次数和各种指标,包括阻塞时间,CPU时间和内存使用情况。一个...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]