-
PHP导入与导出CSV文件实现程序
[PHP教程] 2022-02-09 13:58:07 100人阅读
我们先准备mysql数据表,假设项目中有一张记录学生信息的表student,并有id,name,sex,age分别记录学生的姓名、性别、年龄等信息,代码如下: CREATE TABLE `student` ( `id` int(11) NOT NULL auto_increment, `name` va...[详细]
-
Codeigniter运用PHPExcel导出Excel文件
[PHP教程] 2022-02-09 13:57:43 145人阅读
1.准备工作 下载PHPExcel:http://phpexcel.codeplex.com 这是个强大的Excel库,这里只演示导出Excel文件的功能,其中的大部分功能可能都用不着. 2. 安装PHPExcel到Codeigniter 1) 解压压缩包里的Classes文件夹中的内...[详细]
-
QQ登录集成在自己网站php代码
[PHP教程] 2022-02-09 13:57:09 170人阅读
我们现在在各大网站论坛都可以看到点击一个QQ图标就可以利用自己的QQ号在网站进行登录了,下面我来告诉你一段QQ登录集成到自己网站php代码,有需要的朋友可参考. 1.打开open.qq.com 添加创建应用:-》输入常规的数据,你...[详细]
-
PHP执行Linux命令完成文件压缩
[PHP教程] 2022-02-09 13:56:40 69人阅读
用PHP调用Linux的命令行,执行压缩命令,OK,马上行动. 拆分成3个txt文件 分别是wow_1.txt wow_2.txt 和 wow_3.txt 全部放到 Exl_file 目录下,代码如下: $outputs=array(); 用php的exec执行Linux命令,括号里的字符串就...[详细]
-
PHP怎么CURL伪造IP与来源实现程序
[PHP教程] 2022-02-09 13:56:15 137人阅读
伪造IP来源这个东西在对很多朋友都有用,有的朋友喜欢利用php curl来伪造IP来源,让自己觉得很多IP了,下面我们以伪造IP来源实例来介绍php中curl的用法. curl默认是未被启用的,启用方法. 启用 cURL 设置:如果你是在Wind...[详细]
-
PHP中常用的缓存技术说明
[PHP教程] 2022-02-09 13:55:44 92人阅读
数据缓存:这里所说的数据缓存是指数据库查询缓存,每次访问页面的时候,都会先检测相应的缓存数据是否存在,如果不存在,就连接数据库,得到数据,并把查询结果序列化后保存到文件中,以后同样的查询结果就直接从缓存文件中...[详细]
-
PHP脚本完成Magento权限设置与缓存清理
[PHP教程] 2022-02-09 13:55:03 179人阅读
PHP脚本实现Magento权限设置与缓存清理的实例代码有需要的朋友可参考一下.PHP实例代码如下: ?php ## 设置文件644,目录755 function AllDirChmod( $dir = ./, $dirModes = 0755, $fileModes = 0644 ){ $d = new Recu...[详细]
-
phpExcel数据内存溢出处理办法
[PHP教程] 2022-02-09 13:54:29 155人阅读
云平台需要进行excel数据批量导入,使用的是phpExcel工具,小曲同学的代码都写好后,小数据量下测试都没有问题,可是一到正式环境下,数据超过千条,一行十列为一条数据,就报内存超出. 先看实例,代码如下: ?php require_on...[详细]
-
php统计网站 html页面浏览访问数量程序
[PHP教程] 2022-02-09 13:52:58 158人阅读
本文章来给大这介绍了php自己写的一些常用的网站统计代码写法,用无数据库的与使用数据库及html静态页面浏览资次数统计代码,大家可进入参考. 实例1,直接使用txt文件进行统计的代码,代码如下: ?php session_start();//...[详细]
-
php解决ipv6使curl获取网页内容超时处理办法
[PHP教程] 2022-02-09 13:52:30 112人阅读
问题原因:如果开启了IPv6,curl默认会优先解析 IPv6,在对应域名没有 IPv6 的情况下,会等待 IPv6 dns解析失败 timeout 之后才按以前的正常流程去找 IPv4,在程序中我对curl获取内容都作了较为严格的超时限制,所以就会...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]