随笔分类 - php
php通过拼音首字母查询数据mssql(高效版)
摘要:<?phpclass pysql{ //按拼音检索 function GetHanziScope($pinyin){ $py=strtolower ($pinyin); $hz=array(); for ($i = 0; $i < strlen($py); $i++) { $index = substr($py,$i,1); if($index == "a"){$hz[$i][0] = "吖";$hz[$i][1] = "驁";} else if($index == "b"){$hz[$i][0] =
阅读全文
posted @ 2013-05-03 18:01
狐狸v
php截取html
摘要:<?php/*** 生成摘要* @param (string) $body* 正文* @param (int) $size* 摘要长度* @param (int) $format* 输入格式 id*/function blog_summary($body, $size, $format = NULL){ $_size = mb_strlen($body, 'utf-8'); if($_size <= $size) return $body; // 输入格式中有 PHP 过滤器 // if(!isset($format) && filter_is_ph
阅读全文
posted @ 2013-04-12 09:27
狐狸v
destoon 笔记
摘要:cmseasyhttp://help.destoon.com/book/★新建模块1.destoon_module插入数据2.新建/test/ [中转文件夹](模仿down)2.新建/module/test/ [业务层文件夹](模仿down)3.修改/module/test/admin/config.inc.php 中 $MCFG['name'] $MCFG['moduleid']4.新建/template/default/test/ [模板文件夹]5.新建destoon_test表★模块设置/file/cache/module-23.php/module/te
阅读全文
posted @ 2013-03-13 09:18
狐狸v
php post
摘要:$url = 'http://www.cnblogs.com/api/say';$data = array('username' => 'test', 'words' => 'hello world');$data = http_build_query($data); $ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_RETURN
阅读全文
posted @ 2013-03-06 10:03
狐狸v
找不到函数iconv
摘要:Call to undefined function: iconv()windows 下,把PHP下文件夹dlls下的iconv.dll及extensions下的PHP_iconv.dll拷到system32目录下,设置:extension_dir = "D:\wap\php\extensions"找到php.ini文件把extension=php_iconv.dll去掉前面的;号重启APACHE就可以了
阅读全文
posted @ 2013-03-01 15:12
狐狸v
浙公网安备 33010602011771号