[文章作者:张宴 本文版本:v1.0 最后修改:2007.08.15 转载请注明出处:http://blog.zyan.cc]

  当PHP截取中英文混合字符串时,最后一个汉字经常被拆成两半,例:截取字符串的前18个字
  输出为结果为:
引用
1欢迎访问新浪?BR>


  于是写了以下这段代码,判断如果中英文混合字符串中的汉字字节数为奇数,则少截取一个字节,保证汉字显示完整。
  输出为结果为:
引用
1欢迎访问sina新浪


Tags:
技术大类 » PHP/JS/Shell | 评论(174) | 引用(0) | 阅读(44400)
Eagle Email
2016-8-23 03:13
Your online journal is so interesting and extremely informative. Thanks sharing. Without a doubt an incredible bit of work Thanks for your work.
Percocet Pills
Eagle Email
2016-8-23 03:19
Very interesting subject  value it for posting. The great leaders have always stage-managed their effects.
Buy Percocets Online
Eagle Email
2016-8-23 03:19
I might want to thank you for the efforts you have made in composing this post.
10mg Percocet
Eagle Email
2016-8-23 03:36
Thanks for one’s marvelous posting! I definitely delighted in understanding it youre an incredible author. I will make sure to bookmark your web journal and will frequently return sooner or later.
Codeine Phosphate
Eagle Email
2016-8-23 03:36
I am truly appreciative to the proprietor of this site who has shared this huge passage at this place.
Codeine Pills
Eagle Email
2016-8-23 03:45
I might want to thank you for the efforts you have made in composing this post.
Buy Codeine Online
Eagle Email
2016-8-23 03:45
Your online journal is so interesting and extremely informative. Thanks sharing. Without a doubt an incredible bit of work Thanks for your work.
Codeine 30mg
分页: 9/9 第一页 上页 4 5 6 7 8 9 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]