易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP的时区问题

装了PHP-5.3.0, 启动的时候总是会有
"[06-Aug-2009 13:27:31] PHP Warning:  PHP Startup: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in Unknown on line 0
在lib.ini中设置date.timezone = "Asia/Shanghai", 也没有什么用...
最后在shell中执行TZ='Asia/Shanghai'; export TZ , 重启php-fpm, 解决了..


相关文档:

Php Test

<?php
/*
Version: v1.0
CopyRight Davis.z 2010
Creation Date 2010-02-25
----------------------- Table Script ------------------------
CREATE TABLE [dbo].[T_Employee](
[Name] [nvarchar](50) COLLATE Korean_90_CS_AS NOT NULL,
[Age] [nvarchar](5) COLLATE Korean_90_CI_AS NULL,
[ ......

PHP 判断是否低俗图片==是否@色@情@图@片

if(validatorImage("d:\b.jpg"))
echo '是个低俗图片<br />';
else
echo '不是低俗图片<br />';
function validatorImage($fileName){
$image = getImage($fileName);
$width = ImagesX($image);
$height = ImagesY($image);
$ycb = 0;
for($y=0;$y<$height;$y++){
for($x=0;$x<$widt ......

PHP的日期时间运算总结




<?php
//GB2312的Encode
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
/*重点了解strtotime()函数
1、strftime比time()好用,可以直接把常用的’2010-02-03‘转成时间戳。
2、date( ......

PHP数据结构——冒泡排序与快速排序的比较

//冒泡排序(数组中实现)
function bubble_sort($arr) {
$cnt = count($arr);
if($cnt<=0) return false;
for($i=0; $i<$cnt;$i++) {
for($j=$cnt-1; $j>$i;$j--) {
if($arr[$j]<$arr[$j-1]) {
$tmp = $arr[$j];
$arr[$j] = $arr[$j ......

PHP无限分类的例子(包括数据库)转

其他常见的无限分类方法:
1,简单的通过递归查询加目录path字段的无限分类
缺点:查询数据库次数太多,不方便其他操作,比如删除节点。添加节点,移动节点
2,左右值无限分类,预排序二叉树
缺点:操作繁琐,数据库冗余,且添加删除修改都要进行左右值更新
本分类方法的优势:
1,数据库结构简单,只有 cid parentid ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号