PHP跨时区(UTC时间)应用解决方案

yipeiwu_com6年前
1.将程序内部时区设置为UTC时间.(UTC 也可以叫 GMT) PHP设置: date_default_timezone_set("UTC"); Yii设置: config/main....

PHP中header和session_start前不能有输出原因分析

yipeiwu_com6年前
在http传输文本中,规定必须 header和content顺序必须是:header在前content在后,并且header的格式必须满足“keyword: value\n”这种格式。...

php判断上传的Excel文件中是否有图片及PHPExcel库认识

yipeiwu_com6年前
需要借助PHPExcel这个库复制代码 代码如下:$excelPath = 'Test.xls'; $objReader = PHPExcel_IOFactory::createRead...

浏览器预览PHP文件时顶部出现空白影响布局分析原因及解决办法

yipeiwu_com6年前
在编写PHP文件过程中,发现在浏览器预览PHP文件时,顶部会出现一行空白,影响了页面的布局。 关于BOM header的解释如下: 通常情况下,使用Windows系统自带的记事本程序编写...

用PHP编写和读取XML的几种方式

yipeiwu_com6年前
一.使用DOM生成和读取XML文件 实例一: 复制代码 代码如下: <?php //Creates XML string and XML document using the DO...

PHP读取xml方法介绍

yipeiwu_com6年前
一,什么是xml,xml有什么用途   XML(Extensible Markup Language)即可扩展标记语言,它与HTML一样,都是SGML(Standard Generali...

php图片加水印原理(超简单的实例代码)

yipeiwu_com6年前
文字水印: 复制代码 代码如下: $w = 80; $h = 20; $im = imagecreatetruecolor($w,$h); $textcolor = imagecolor...

APACHE的AcceptPathInfo指令使用介绍

yipeiwu_com6年前
学习zfdemo的时候提到设置 AcceptPathInfo 指令. 有时我们在做虚拟静态化或者让路径看起来很漂亮的时候,可能会看到http://www.example.com/inde...

php牛逼的面试题分享

yipeiwu_com6年前
1.nginx使用哪种网络协议? nginx是应用层 我觉得从下往上的话 传输层用的是tcp/ip 应用层用的是http fastcgi负责调度进程 2. <? echo 'hel...

PHP中CURL方法curl_setopt()函数的参数分享

yipeiwu_com6年前
PHP CURL curl_setopt 参数bool curl_setopt (int ch, string option, mixed value)curl_setopt()函数将为...