-
PHP中dat文件读写操作实例详解
[PHP教程] 2022-02-13 14:08:37 79人阅读
在php不不管读取什么类型的文件多半是使用fopen函数,然后配合其它的函数再进行操作,下面我来介绍读取dat数据文件的方法. 以下是一篇关于文件基本读写操作的文章,我曾经就是看了这篇文章后学会文件基本操作的,在这里...[详细]
-
PHP的json_encode使用分析说明
[PHP教程] 2022-02-13 14:08:12 89人阅读
json的优点就不说了,有个习惯,我在输出json的时候,喜欢用 sprintf 拼成json格式,前两天被朋友说不标准,必须要用json_encode生成的才是标准的json格式,我当然很郁闷啦,用了这么多年了,刚知道这样做不标准,既然说我不...[详细]
-
PHP程序自动运行,windows计划任务
[PHP教程] 2022-02-13 14:07:55 170人阅读
具体来说,我们若需利用任务计划程序自动运行则应执行如下步骤: 1.单击开始按钮,然后依次选择程序附件系统工具任务计划(或者是设置控制面板任务计划),启动Windows 2000的任务计划管理程序。 2.在任务计划窗口中双...[详细]
-
php 解决表单重复提交实现方法介绍
[PHP教程] 2022-02-13 14:07:38 93人阅读
重复提交是我们开发中会常碰到的一个问题,除了我们使用js来防止表单的重复提交,同时还可以使用php来防止重复提交. 例1,代码如下: ?php /* * php中如何防止表单的重复提交 */ session_start(); if (emptyempty($_SESS...[详细]
-
PHP提交表单失败后如何保留填写的信息
[PHP教程] 2022-02-13 14:07:19 62人阅读
本文章来给各位同学介绍PHP提交表单失败后如何保留填写的信息一些方法总结,最常用的就是使用缓存方式了,这种方法如果网速慢是可能出问题的,最好的办法就是使用ajax了. 1.使用header头设置缓存控制头Cache-control,P...[详细]
-
php检测服务器是否支持gzip代码
[PHP教程] 2022-02-13 14:07:04 179人阅读
检测是否支持gzip 是可以利用function_exists函数来判断你的php环境支持ob_gzhandler不,如果支持就支持者gzip了. 自己写了一个函数,代码如下: ?php if(extension_loaded(zlib)) {ob_start(ob_gzhandler);} header(Co...[详细]
-
PHP垃圾回收机制的理解
[PHP教程] 2022-02-13 14:06:28 192人阅读
php 5.3之前使用的垃圾回收机制是单纯的引用计数,也就是每个内存对象都分配一个计数器,当内存对象被变量引用时,计数器 1;当变量引用撤掉后,计数器-1;当计数器=0时,表明内存对象没有被使用,该内存对象则进行...[详细]
-
PHP memcache实现消息队列实例
[PHP教程] 2022-02-13 14:02:29 177人阅读
memche消息队列的原理就是在key上做文章,用以做一个连续的数字加上前缀记录序列化以后消息或者日志,然后通过定时程序将内容落地到文件或者数据库. php实现消息队列的用处比如在做发送邮件时发送大量邮件很费时间的问...[详细]
-
处理php curl_multi批处理造成CPU负载过高问题
[PHP教程] 2022-02-10 14:45:48 148人阅读
今天在利用curl_multi函数来获取一些外网内容时发现只要一运行curl_multi函数我的cpu就占得非常的高,后来看一站长分享了此问题解决方法我也整理一下与各位分享一下,希望对大家有帮助. 简单的cURL处理如下,代码如下: ...[详细]
-
PHP网站安装完成程序
[PHP教程] 2022-02-10 14:45:28 93人阅读
网站安装过程我们需要几处非常简单,一个是我们要让用户输入用户名密码然后连接数据库之后再把我们以前准备好.sql文件利用php读取并执行,最后简单配置一下站点,这样一个完整的php网站安装过程就完美的搞定了. 这次顺...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]