-
php 中mysql导出excel文件方法
[PHP教程] 2022-02-15 15:46:19 146人阅读
我们用最简单的方法直接用php+mysql来实现了,代码如下: ?php include(db/db.php); //包含连库类 $db = new db(); $result = mysql_query(select * from market_sig into outfile d:product3.xls;); var_dump($result...[详细]
-
php生成html文件的多种方法介绍
[PHP教程] 2022-02-15 15:45:48 167人阅读
文章介绍了三种在php中使用种可以用来生成html文件的方法,前面是利用了php的ob_start,后面使用了smarty模板的朋友来生成方法. 我经常会在网上看到有人问怎么将整个动态的网站静态化,其实实现的方法很简单,代码如下: ...[详细]
-
php读取qqwry dat ip地址数据库文件程序
[PHP教程] 2022-02-15 15:45:26 158人阅读
先看看QQWry.Data文件的内容结构以及解读方式. 一、文件结构 文件主要分三个结构 1、文件头,8个字节;2、数据记录区,不定长度;3、索引区,长度为 7 的整数倍; 二、文件头 文件头的8个字节分两部分,每个部分4个字节,...[详细]
-
php中static静态类与static 静态变量用法区别
[PHP教程] 2022-02-15 15:45:03 78人阅读
static是定义一个静态对象或静态变量,关于static 定义的变量或类方法有什么特性我们看完本文章的相关实例后就见分晓了. 1. 创建对象$object = new Class(),然后使用-调用:$object-attribute/function,前提是该变...[详细]
-
php后台多用户权限组思路与实现程序代码
[PHP教程] 2022-02-15 15:44:38 147人阅读
网站开发少不了有网站后台,有了后台自然要对用户有同角色来分配一下,特别是多用户系统的情况下,如我一个系统要有多个管理员,那么我这些管理要分成,编辑,友情连接,管理员等,那我们要有权限和角色分配,今天我们就来看...[详细]
-
iis防止php ddos占完网络带宽与服务器资源解决
[PHP教程] 2022-02-15 15:44:23 96人阅读
用PHP代码调用sockets,直接用服务器的网络攻击别的IP,以前我在apache下有碰到这样的问题,今天我们讲讲述一下关于在iis防止php ddos占完网络带宽与服务器资源的处理办法. php ddos的常见代码如下: ?php $packets = 0;...[详细]
-
php计划任务之ignore_user_abort函数实现
[PHP教程] 2022-02-15 15:43:53 123人阅读
PHP 不会检测到用户是否已断开连接,直到尝试向客户机发送信息为止,简单地使用 echo 语句无法确保信息发送,参阅 flush() 函数,代码如下: ?php ignore_user_abort(true); set_time_limit(0); while(1) { $fp = fopen(t...[详细]
-
php利用json数据实现跨域操作实例
[PHP教程] 2022-02-15 15:42:15 114人阅读
某网站后台用php脚本得到一个JSON格式的数据,交给前台javascript进行处理,使用JSON实现数据的跨域调用. 后台profile.php代码如下: ?php $arr = array( firstname = iconv(gb2312, utf-8, 非诚), lastname = iconv(gb...[详细]
-
php与浏览器缓存机制说明
[PHP教程] 2022-02-13 14:39:04 86人阅读
浏览器的缓存策略,会暂时将浏览过的文件缓存在本地磁盘,当用户重复请求页面时,告知客户端页面并没有发生改变,可以调用缓存,那么如何知道客户端是否有页面缓存呢?从 HTTP 协议层面来说,浏览器发送请求时会先发送如下...[详细]
-
php页面缓存实现办法总结
[PHP教程] 2022-02-13 14:38:24 74人阅读
在php页面缓存主要用到的是ob系列函数,如ob_start(),ob_end_flush(),ob_get_contents(),但是更高级的缓存是不使用这些函数的,本文章最后一个实现就有讲到,大家可参考一下. ob_start():页面缓存开始的标志,此函数一...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]