function createTagCloud($tags) { //I pass through an array of tags $i=0; foreach($tags as $tag) { $id = $tag['id']; //the tag id, passed through $name = $tag['tag']; //the tag name, also passed through in
分享一個php實現的圖片處理類,可以設定文字浮水印與圖片浮水印等,有需要的朋友參考下。本節分享一個圖片處理類,簡單實現了文字浮水印與圖片浮水印,是學習php圖片操作的小例子。代碼:image = new Imagick($tplImage); } /** * 設定文字屬性 * * @param string $sText text to print on the image (i.e. Buy 1 Get 1 Free ) * @param integer $x
print(date( "l dS of F Y h:i:s A" ));print("July 1, 2000 is on a " . date("l", mktime(0,0,0,7,1,2000)));?>複製代碼例二: $tomorrow = mktime(0,0,0,date("m") ,date("d")+1,date("Y"));$lastmonth = mktime(0,0,0,date("m")-1,date("d"), date("Y"));$nextyear =
/* com_create_guid()是php5版本支援的功能,對於不支援的版本,可以自己進行定義;*/function guid(){ if (function_exists('com_create_guid')){ return com_create_guid(); }else{ mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
/*** 截取中英文混合的字串* by bbs.it-home.org*/function mb_str_split($string){ # Split at all position not after the start: ^ # and not before the end: $ //$string = iconv('gb2312', 'utf-8//ignore', $string); return
/** php產生折線圖* by bbs.it-home.org*/function line_stats_pic($value_y,$width,$high,$strong=1,$fix=0){ //y值處理函數 function line_point_y($num,$width,$high,$max_num_add,$min_num_add,$y_pxdensity){
tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/usr/local/zlib make make install複製代碼2,安裝libpng tar zxvf libpng-1.2.8.tar.tar cd libpng-1.2.8 mv ./scripts/makefile.linux ./makefile make make install 複製代碼注意,這裡的makefile不是用./configure產生,