php 生成拼音缩写,PHP生成中文拼音

PHP生成中文拼音

以下为引用的内容:

php代码:

class ChineseSpell {

/**

* @var array $chineseSpellList 拼音编码对应表

* @access private

*/

private $chineseSpellList = array(

'a'=>-20319,

'ai'=>-20317,

'an'=>-20304,

'ang'=>-20295,

'ao'=>-20292,

'ba'=>-20283,

'bai'=>-20265,

'ban'=>-20257,

'bang'=>-20242,

'bao'=>-20230,

'bei'=>-20051,

'ben'=>-20036,

'beng'=>-20032,

'bi'=>-20026,

'bian'=>-20002,

'biao'=>-19990,

'bie'=>-19986,

'bin'=>-19982,

'bing'=>-19976,

'bo'=>-19805,

'bu'=>-19784,

'ca'=>-19775,

'cai'=>-19774,

'can'=>-19763,

'cang'=>-19756,

'cao'=>-19751,

'ce'=>-19746,

'ceng'=>-19741,

'cha'=>-19739,

'chai'=>-19728,

'chan'=>-19725,

'chang'=>-19715,

'chao'=>-19540,

'che'=>-19531,

'chen'=>-19525,

'cheng'=>-19515,

'chi'=>-19500,

'chong'=>-19484,

'chou'=>-19479,

'chu'=>-19467,

'chuai'=>-19289,

&nb

相关文档:

/*

图片处理类:缩略,裁剪,圆角,倾斜

*/

class resizeimage

{

//图片类型

var $type;

//实际宽度

var $width;

//实际高度

var $height;

//改变后的宽度

var $resiz ......

用php获取本周,上周,本月,上月,本季度日期的代码,主要用到date,strtotime和mktime函数.

echo date("Ymd",strtotime("now")), "
";

echo date("Ymd",strtotime("-1 week Monday")), "
";

echo date("Ymd",strtotime("-1 week Sunday")), "
";

echo date("Ymd",strtotime("+0 week ......

Tag:

-

1.

$query = $this->db->query('SELECT name, title, email from my_table');

foreach ($query->result() as $row)

{

echo $row->title;

echo $row->name;

echo $row->email;

}

2.

foreach ($query->result_array() as $row)

{

echo $row['title'];

echo $row['name'];

ech ......

前一阵试用 tokyo tyrant 碰到一个麻烦,

在php上用memcache接口,取出数据的时候,不会自动反序列化。比如了一个 array(1,2,3,4,5),出来就是 'a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}' 了。

Wireshark 跟踪了一下,发现和标准memcached返回的数据里差一个字节。去看了下 memcached

协议,发现这个字节是� ......

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值