摘要: php_imagick程序示例 1.创建一个缩略图并显示出来 <?phpheader('Content-type: image/jpeg');$image = new Imagick('image.jpg');// If 0 is provided as a width or height para 阅读全文
posted @ 2016-12-14 16:22 3002059249 阅读(365) 评论(0) 推荐(0) 编辑
摘要: array_slicearray array_slice ( array $array , int $offset [, int $length = NULL [, bool $preserve_keys = false ]] ) 返回数组中指定下标offset和长度length的子数组切片。 参数 阅读全文
posted @ 2016-12-14 15:41 3002059249 阅读(5394) 评论(0) 推荐(0) 编辑
摘要: 创建一个新的XML文件,并且写入一些数据到这个XML文件中。 /** 创建xml文件*/$info = array(array('obj' => 'power','info' => 'power is shutdown'),array('obj' => 'memcache','info' => 'm 阅读全文
posted @ 2016-12-14 15:34 3002059249 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 假设你要建立一个服务来检查正在运行的n台服务器,以确定他们还在正常运转。你可能会写下面这样的代码:代码如下:<?php$hosts = array("host1.sample.com", "host2.sample.com", "host3.sample.com");$timeout = 15;$s 阅读全文
posted @ 2016-12-14 15:23 3002059249 阅读(3510) 评论(1) 推荐(0) 编辑
摘要: 目前Data URI scheme支持的类型有: data:text/plain,文本数据data:text/html,HTML代码data:text/html;base64,base64编码的HTML代码data:text/css,CSS代码data:text/css;base64,base64编 阅读全文
posted @ 2016-12-14 15:14 3002059249 阅读(2497) 评论(0) 推荐(0) 编辑
摘要: function getIp(){if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))$ip = getenv("HTTP_CLIENT_IP");else if (getenv("HTTP_ 阅读全文
posted @ 2016-12-14 15:04 3002059249 阅读(1073) 评论(0) 推荐(0) 编辑