-
PHP加密扩展库Mcrypt安装与应用实例
[PHP教程] 2022-02-10 14:26:34 63人阅读
在php中如果我们要使用PHP Mcrypt加密扩展库就必须先安装好这个加密扩展库,然后再可以使用,因为它与gd库一样默认是未安装的. mcrypt简单介绍 PHP程序员们在编写代码程序时,除了要保证代码的高性能之外,还有一点是非...[详细]
-
PHP5中哈希创建和验证方法详解
[PHP教程] 2022-02-10 14:26:15 52人阅读
如果你使用php5.5版本的话我们对于哈希创建和验证方法就简单多了,PHP 5.5为我们提供了4个函数:password_get_info(), password_hash(), password_needs_rehash(),和password_verify(),有了它们四我们就可以快速实现哈...[详细]
-
PHP DDos的几个防御方法详解
[PHP教程] 2022-02-10 14:25:51 100人阅读
PHP DDos是一种利用服务器就是利用我服务器的php.ini中配置allow_url_fopen = On才得成了,但allow_url_fopen 这个功能很多网站都需要使用,下面我来给大家介绍一些关于PHP DDos的几个防御方法. 我们先来看php ddos代...[详细]
-
PHP防CC攻击实现代码总结
[PHP教程] 2022-02-10 14:25:30 171人阅读
CC攻击就是对方利用程序或一些代理对您的网站进行不间断的访问,造成您的网站处理不了而处于当机状态,下面我们来总结一些防CC攻击的php实例代码,各位朋友可参考. 例1,代码如下: //代理IP直接退出 emptyempty($_SERVER...[详细]
-
关闭php执行系统指令函数
[PHP教程] 2022-02-10 14:25:14 200人阅读
php的四个函数exec,shell_exec,system,passthru可以执行系统指令,对系统安全构成威胁,如果不用的话可以将其关闭,代码如下: vim /etc/php.ini 去掉disable_functions前注释,编辑内容如下: disable_functions = exec,s...[详细]
-
php漏洞之跨网站请求伪造与防止伪造方法
[PHP教程] 2022-02-10 14:24:55 180人阅读
今天我来给大家介绍在php中跨网站请求伪造的实现方法与最后我们些常用的防止伪造的具体操作方法,有需要了解的朋友可进入参考. 伪造跨站请求介绍 伪造跨站请求比较难以防范,而且危害巨大,攻击者可以通过这种方式恶作...[详细]
-
php中safe_mode安全模式配置详解
[PHP教程] 2022-02-10 14:24:25 69人阅读
在php中有一个普通模式与安全模式了,现在大多数据用户都是直接使用应用程序的php普通模式了,因为安全模式配置之后有很多功能受到了限制,下面我来给大家具体讲述安全模式配置方法. 当安全模式打开的时候,以下函数列表...[详细]
-
PHP 防注入安全实现程序代码
[PHP教程] 2022-02-10 14:24:00 120人阅读
以前讲述的很多关于sql防注入的代码,但是还是得从我们的服务器脚本开始了,下面就来讲述一个下php中防注入的一些常见方法大家可参考. 最常用见的可能就是: 首先将magic_quotes_gpc设置为On,display_errors设置为Off,...[详细]
-
php中DOMDocument与SimpleXML创建与解析xml程序
[PHP教程] 2022-02-10 14:23:16 60人阅读
通过DOM扩展创建一个DOMDocument对象,通过DOMDocument对象的方法向文档添加元素,最后通过save()或saveXML()方法来生成文档,也可以通过SimpleXML来快速解析xml文档. 例子:DOM XML 解析器函数是 PHP 核心的组成部分,无...[详细]
-
PHP生成XML格式数据与解析xml数据
[PHP教程] 2022-02-10 14:22:52 98人阅读
本文章来详细的介绍一下关于PHP生成XML格式数据与解析xml数据程序代码,有需要学习的朋友可参考参考,先看xml文档,代码如下: ?xml version=1.0 encoding=utf-8? article item title size=1title1/title contentcontent...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]