-
PHP static 静态变量和属性方法使用说明
[PHP教程] 2022-02-09 13:45:25 166人阅读
变量与其它变量明确区别的,下面我来给各位介绍 static 静态变量和属性方法及静态变量的引用与静态函数的用法,各位有需要了解的同学可参考. 静态变量:变量范围的另一个重要特性是静态变量(static variable),静态变量...[详细]
-
PHP数据采集程序采集天气网数据实例演示
[PHP教程] 2022-02-09 13:45:07 91人阅读
前言:我们在写一个Web程序的时候,总会想着把自己的网站更美观一些,功能能更多一些,有时候写一些小的工具或者加上小的插件会让我们的站点更加完善,比如万年历功能,比如我们现在要讲的天气预报功能. 当然我们没法利用...[详细]
-
shell 脚本检查某目录下php文件语法
[PHP教程] 2022-02-09 13:44:38 123人阅读
利用php的自带检查文件方法 php -l 来使用shell 批量检查某目录下的文件,每次写完脚本都要 php -l 一下,看看有没有发生低级的语法错误,(疏忽过导致事故),写了个简单的shell 脚本批量检查目录下的 php文件语法,代码如...[详细]
-
PHPExcel生成和读取Excel文件实例程序
[PHP教程] 2022-02-09 13:44:14 50人阅读
PHPExcel是一个非常方便生成Excel格式文件的类,官方下载包中带有大量如何生成各种样式excel文件的示例,但没有一个读取Excel文件的完整例子.Xiaoqiang根据网上的资料,整理了一份简单读取Excel文件的例子 在网站的管理...[详细]
-
php 异步执行脚本程序代码
[PHP教程] 2022-02-09 13:43:55 152人阅读
这里说的异步执行是让php脚本在后台挂起一个执行具体操作的脚本,主脚本退出后,挂起的脚本还能继续执行,比如执行某些耗时操作或可以并行执行的操作,可以采用php异步执行的方式,主脚本和子脚本的通讯可以采用外部文件...[详细]
-
php html解析器Simple HTML Dom使用说明
[PHP教程] 2022-02-09 13:43:22 166人阅读
1. 开始使用 首先下载解压缩,然后将simple_html_dom.php文件包含进要编写的脚本文件中,加载要处理的html,支持三种模式的html加载,分别是『从url中加载,从字符串中加载,从文件中加载』.代码如下: require_once(simple...[详细]
-
Zend OPCache加速PHP使用说明
[PHP教程] 2022-02-09 13:42:45 136人阅读
Zend Opcache配置方法 Zend Opcache 已经集成在了PHP 5.5里面,编译安装PHP5.5的时候加上--enable-opcache就行了,但也支持低版本的 PHP 5.2.*, 5.3.*, 5.4.*,未来会取消对5.2的支持,下面是我在PHP 5.4下的安装方法. ...[详细]
-
PHP Shell大文件数据统计并且排序
[PHP教程] 2022-02-09 13:42:26 103人阅读
诸多大互联网公司的面试都会有这么个问题,有个4G的文件,如何用只有1G内存的机器去计算文件中出现次数做多的数字(假设1行是1个数组,例如QQ号码),如果这个文件只有4B或者几十兆,那么最简单的办法就是直接读取这个文件...[详细]
-
利用Php的CURL POST提交表单登录实例详解
[PHP教程] 2022-02-09 13:41:45 161人阅读
例1,CURL使用POST提交XML数据,代码如下: $url = http://www.Cuoxin.com; !--?xml version=1.0?-- $ch = curl_init(); $header[] = Content-type: text/xml;//定义content-type为xml curl_setopt($ch, CURLOPT_URL, $...[详细]
-
php伪静态的写法,apache伪静态规则
[PHP教程] 2022-02-09 13:41:23 164人阅读
在php中我们要做伪静态可以直接利用php来处理url,但这种伪静态不是标准的可以说看起来像水货一样的,只是找个心里舒服了,当然如果要实现真正的伪静态我们可以使用apache Rewrite伪静态模块来实例,下面大家来看看. php...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]