destoon采集论坛

 找回密码
 立即注册
查看: 53|回复: 0

这个将标题汉字转换为拼音首字母应该放在哪个文件内?

[复制链接]

31

主题

16

回帖

135

积分

注册会员

Rank: 2

积分
135
发表于 2010-12-9 22:15:33 | 显示全部楼层 |阅读模式
[ol][*]function getfirstchar($str){
[*]$fchar=$str[0];
[*]//判断是否为字符串
[*]if(ord($fchar)-->=ord("A") && ord($fchar)=-20319 and $asc=-20283 and $asc=-19775 and $asc=-19218 and $asc=-18710 and $asc=-18526 and $asc=-18239 and $asc=-17922 and $asc=-17417 and $asc=-16474 and $asc=-16212 and $asc=-15640 and $asc=-15165 and $asc=-14922 and $asc=-14914 and $asc=-14630 and $asc=-14149 and $asc=-14090 and $asc=-13318 and $asc=-12838 and $asc=-12556 and $asc=-11847 and $asc=-11055 and $asc复制代码

想将内容页标题作为URl,汉字太长了,用拼音首字母会好很多,不知道加在哪个程序文件中。。有知道的兄弟吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|destoon采集论坛

GMT+8, 2025-11-26 22:38 , Processed in 0.013592 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表