-
php XMLWriter类的简单示例
[PHP教程] 2022-02-10 14:22:35 54人阅读
前面的mysql.php 是封装的mysql数据库功能,单例模式,所以取对象是静态方法 mysql::getObject(); 代码很简单,如下所示: include mysql.php; $mysql= mysql::getObject(); $mysql-query(SELECT * FROM post); $xml = n...[详细]
-
php Simplexml_Load_file解析xml详细实例
[PHP教程] 2022-02-10 14:22:15 176人阅读
xml文档格式如下: ?xml version=1.0 encoding=utf-8? list company武汉xxx公司/company user name张三/name age sex=未知a/age height1/height /user user name李四/name age sex=女b/age height2/height /user user...[详细]
-
PHP和mxml 实现FLASH 曲线图
[PHP教程] 2022-02-10 14:21:50 189人阅读
MXML是一个可以让你在Adobe Flex中布局用户界面组件的一种XML语言,你也可以使用MXML声明来定义程序中的非可视化组件,安装好FLEX Development 后,你就可以轻松的结合PHP完成一个FLASH曲线图. 先从PHP入手: FLEX 和PHP...[详细]
-
PHP自动识别用户上传不雅图片并发邮箱提示
[PHP教程] 2022-02-10 14:21:31 50人阅读
在这份教程中,我们将会学习到如何阻止用户通过上传不雅图片,这个测试了一下只有一点作用,但人家真的要做了估计也没有办法了,下面来给大家介绍解决办法吧. 下载:http://www.rrpowered.com/code/RRPowered-NudityFilte...[详细]
-
PHP安全之防止.inc配置信息暴露
[PHP教程] 2022-02-10 14:21:14 168人阅读
.inc文件在很久以前都是配置文件了,这样如果apache没有配置好很容易配置文件给爆露出来,下面我就来介绍具体的设置办法. 发现现在的项目是把所有的包含文件放在主目录下面,网站目录为public,除了入口文件,所有的源码...[详细]
-
php 表单令牌防止重复提交原理
[PHP教程] 2022-02-10 14:20:52 53人阅读
在生成表单的时候,为防止表单重复提交。在form表单中添加一个隐藏的input标签来存放令牌,等到提交的时候,和表单一起提交,提交以后和生成的session值作比较,通过这种方式来达到防止重复提交的目的,简要代码如下. 例子...[详细]
-
PHP用PDO防Sql注入注意事项
[PHP教程] 2022-02-10 14:20:20 161人阅读
防注入是程序员一个必须要了解的基本安全知道,下面我来介绍关于php使用pdo时的一些防注入安全知识,希望此教程对你会有所帮助. 在PHP 5.3.6及以前版本中,并不支持在DSN中的charset定义,而应该使用PDO::MYSQL_ATTR_INI...[详细]
-
php预防XSS攻击的一些方法整理
[PHP教程] 2022-02-10 14:19:55 113人阅读
现在有很多php开发框架都提供关于防XSS攻击的过滤方法,下面和大家分享一个预防XSS攻击和ajax跨域攻击的函数,摘自某开发框架,相比于仅仅使用内置函数应该还是够强了的吧. 对网站发动XSS攻击的方式有很多种,仅仅使用ph...[详细]
-
Memcache php提高mysql负载有效办法
[PHP教程] 2022-02-09 14:14:33 150人阅读
在php mysql的web应用中我们经常会碰到上千万级的数据量,为了减轻服务器的负载我们经常会使用第三个工具来减压,下我们为你提供一款Memcache php提高mysql负载有效方法. Memcache的理由: 1.Web Server(Lighttpd、Ngin...[详细]
-
php里simplexml_load_string使用实例
[PHP教程] 2022-02-09 14:14:02 135人阅读
在php中simplexml_load_string() 函数把 XML 字符串载入对象中,下面我来给大家介绍几个简单实例的同时也介绍在使用simplexml_load_string的一些需要注意的事项. 先用一段代码重现一下问题,乍一看,结果很让人费解,代...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]