PHP技术
FROM_UNIXTIME
UNIX_TIMESTAMP
测试了下  php_imagick 的一些功能希望能对你有用
<?php
//define('PATH',dirname(__FILE__));
//$srcIMG = PATH.'/src.png';
////$srcIMG3 = PATH.'/039.jpg';
////$srcIMG4 = PATH.'/041.jpg';
////$srcIMG = PATH.'/SI851275.JPG';
//$newIMG = PATH.'/newImage.png';
//$img = new Imagick($srcIMG);
////$img->writeImage($newIMG);exit;
//////$img->charcoalImage(1,0.1); // 木炭效果 不错
//////$img->chopImage(100,100,100,100); // 模糊效果 不错
//////$img->commentImage('hello World'); // 添加图片评论
//////echo $img->getImageProperty('comment'); // 读取图片属性
//////$img->cropImage(200,100,200,200); //裁减图片 很有用
//////$img->cropThumbnailImage(1000,1000); // 缩放后居中裁减
//////$img->despeckleImage(); // 去除一些杂点
////
/////* 在上面写字
////$string = 'hello World';
////$draw = new ImagickDraw();
////$draw->setFillColor(new ImagickPixel('blue'));
////$draw->setFontSize(28);
////$metrix = $img->queryFontMetrics($draw, $string);
////$draw->annotation(25,125,$string);
////$img->drawImage($draw);
////*/
////
//////$img->edgeImage(0); // 高亮边缘?
////
//////$img->embossImage(0,0.1 ); // 感觉好像加入光照效果
////
//////$img->enhanceImage(); // 提高图片品质
////
//////$img->equalizeImage(); // 好像增加对比及光照把
////
//////$img->flipImage(); // 垂直翻转把!
////
//////$img->flopImage(); // 水平翻转把!
////
//////$img->frameImage(new ImagickPixel('green'),15,15,2,2);
////
/////* 去色
////$clone = $img->clone();  
////$clone = $img->fximage('p{0,0}');  
////$img->compositeImage($clone,imagick::COMPOSITE_DIFFERENCE,0,0);
////$img->modulateImage(100, 0 , 0); // 加个3d边框
////*/
////
//////$img->gammaImage(10); // gamma 校正
////
//////$img->gaussianBlurImage(1,1); // 高斯模糊图像
////
//////$img->getCompression(); // 压缩图像?
////
//////$img->getCompressionQuality(); // 压缩图像?
////
//////echo $img->getCopyright(); // 获得版权 Copyright (C) 1999-2007 ImageMagick Studio LLC
////
//////$img->oilPaintImage(3); // 油画效果
//////$img->adaptiveResizeImage(300,300);
//$img->setImageFormat('png');
////$bg = new ImagickDraw();
////$imgs = array($srcIMG2,$srcIMG3,$srcIMG4);
////$img2 = new Imagick($imgs);
////foreach ($img2 as $i){
////$i->thumbnailImage(100,null);
////$i->setImageBackgroundColor( new ImagickPixel( "black" ) );  
/////* Use a random angle */  
////$angle = mt_rand( 1, 45 );
////if ( mt_rand( 1, 2 ) % 2 === 0 ){      
////    $angle = $angle * -1;  
////}
////$i->polaroidImage( $bg, $angle );
////$img->compositeImage( $i, Imagick::COMPOSITE_OVER, mt_rand( 10, 350 ), mt_rand( 10, 350 ) );
////}
//////$img2->writeImage($newIMG);
////$img2->removeImage();
//
//
////#
////$draw = new ImagickDraw();
////#
////
////#
/////* Set the fill color to light blue */
////#
////$draw->setFillColor( new ImagickPixel( 'light blue' ) );
////#
////
////#
/////* Create the polaroid image */
////#
////$img->polaroidImage( $draw, 20 );
//
////$img->radialBlurImage(10); // 径向模糊
//
////$img->raiseImage(20,20,10,10,false); // 整个按钮
//
////$img->rotateImage(new ImagickPixel(), 270); // 旋转
////$img->scaleImage(300,300,true); // 感觉像缩放
//
////$img->sepiaToneImage(70); // 深褐色调节?
//
////$img->setCompression(imagick::COMPRESSION_ZIP);
////// a value between 1 and 100, 1 = high compression, 100 low compression
////$img->setCompressionQuality(100);
//
////$img->setImageBias(90); // 不懂
//
////$img->setImageColorspace(3);
//
//
////$img->setImageGamma  (10); // 设置gamma效果
////$img->setImageOpacity  (0.8); // 设置图像透明
//
////$img->thumbnailImage(500, 0);
////$img->setInterlaceScheme(Imagick::INTERLACE_PLANE);
////$img->charcoalImage(1,0.1);
////$img->sketchImage(10,0.1,5); // 听说素描效果
//
////$img->solarizeImage(100); // 曝光°
//
////$img->spliceImage(100,100,10,10);
////$img->spreadImage(5);
////$img->swirlImage(30); // 旋转扭曲图像
//
////$new_image = $img->transformImage( "500x600", "500x500" );
////$new_image ->writeImage($newIMG);
//
////$img->transposeImage(); // 逆时针旋转 90°
//
////$img->transverseImage(); // 顺时针旋转 90°
//
////$img->vignetteImage(1,1,10,50); // 圆切?
//
////$img->waveImage(10,10); // 浪折
//
//$img->whiteThresholdImage('grey');
//$img->writeImage($newIMG);
//$img->clear();
//$img->destroy();
?>



附上 最新编译的: PHP 5.2.8 的 php_imagick.dll  下载后放入 ext 目录下 并在 php.ini加入这个扩展
例如:

extension=php_imagick.dll



群里看到几个笑话 不错
Posted in PHP技术 on 2008/12/13 / 评论(0) »
2.一犯人被执行枪决 ,由于子弹是劣质的,第一枪没放出,接着又放了
第二枪...第三枪...这时犯人哭了:大哥你掐死我吧,太他妈吓人了!

3.一老太太看完黑人百米赛后,抹着眼泪说:吓死人!几个挖煤的跪成一排被枪
毙,没瞄准就开了枪,娃儿们吓得那个跑呀,绳子都拦不住哇!

4、黄先生热爱革命,为纪念红军,给儿子取名为'军',
一天送儿子上课,见公交 8路进站,
于是冲儿子大喊:黄军快跑,八路来了!~~~

5、一只小熊去山里创业,农夫给了他一把镰刀,木匠给了他一把锤子,
小熊来到山里遇到老虎,吓得把镰刀、锤子举在头顶,
老虎说:没看出来,就你这熊样还是个党员来!

6、农夫挑担大粪,老外看到后问:大爷,这酱多少钱一斤?
农夫不语,老外用手沾了点放进嘴里,心想:你不告诉我多少钱一斤,
我也不告诉你你的酱都臭了

猪你天天开心拉
select * from siteblocks where id in (1,6,7,21,2,3,5) and manage<=1 order by instr(",1,6,7,21,2,3,5,",concat(",",id,","));
select * from siteblocks where id in (1,6,7,21,2,3,5) and manage<=1 order by FIND_IN_SET(id,'1,6,7,21,2,3,5');


哪个强悍点没去试 个人猜想2强悍点把
Php-cgi.exe CGI Error!
Posted in PHP技术 on 2008/10/23 / 评论(0) »
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

try change
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]
".php"="[PUT PATH HERE]\\php.exe"

try


; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers.  Left undefined, PHP turns this on by default.  You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
cgi.force_redirect = 0
分页: 1/20 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]