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

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


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


Tags:
技术大类 » PHP/JS/Shell | 评论(174) | 引用(0) | 阅读(45369)
AVIS Email
2015-11-16 23:44
Great Information, very interesting and useful for me. Thanks
Buy Watson Online
AVIS Email
2015-11-17 01:24
I like this blog thanks for such a great Information.
Buy Percocet Online
AVIS Email
2015-11-17 02:06
Superb Information, I really appreciated with it, This is fine to read and valuable pro potential, I really bookmark it, pro broaden read. Appreciation pro sharing. I like it.
Buy Xanax Online
AVIS Email
2015-11-17 02:17
Thanks for the informative writing. Would mind updating some good tips about it. I still wait your next place.
Buy Vicodin ES Online
AVIS Email
2015-11-17 02:28
Very significant Information for us, I have think the representation of this Information is actually superb one. This is my first visit to your site.
Buy K25 Online
AVIS Email
2015-11-17 02:39
Hey great stuff, thank you for sharing this useful information and i will let know my friends as well.
AVIS Email
2015-11-17 02:39
Hey great stuff, thank you for sharing this useful information and i will let know my friends as well.
Buy Lortab Online
AVIS Email
2015-11-17 02:49
I got here much interesting stuff. The post is great Thanks for sharing it
Buy Ritalin Online
AVIS Email
2015-11-17 02:58
Superb Information, I really appreciated with it, This is fine to read and valuable pro potential, I really bookmark it, pro broaden read. Appreciation pro sharing. I like it.
Buy Valium Roche Online
AVIS Email
2015-11-17 03:12
Thanks for your Information, I like your blog very much, Well done.
Buy Codeine Online
AVIS Email
2015-11-17 03:21
Well, very good post with informative information. I really appreciate the fact that you approach these topics from a stand point of knowledge and information. This is the first time, I visited at your site and became your fan. You are bookmarked. Please keep on posting.
Buy Adderall Online
AVIS Email
2015-11-17 03:31
Hey, its an amazing information dude. Thanks for sharing this great.
Buy Hydrocodone Online
AVIS Email
2015-11-17 03:48
I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post.
Buy Phentermine Online
Ken Mark Homepage
2016-1-5 23:39
This is great Information, very interesting and useful for me. Thanks
Pharmacy Online
Ken Mark Homepage
2016-1-6 00:52
Thanks for sharing it. I found this Information very interesting and informative keep sharing
Buy Medicine Online
Ken Mark Homepage
2016-1-6 03:25
I found this Information very interesting and informative keep sharing
Medicine Online
Ken Mark Email Homepage
2016-1-6 05:14
This site is excellent and so is how the subject matter was explained. I also like some of the comments too and waiting for next post.
Drug Medicine
~ken~ Email
2016-2-11 23:25
Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it.
Buy Watson Online
~ken~ Email
2016-2-12 00:00
I enjoy a couple of from the Information which has been written, and particularly the comments posted! I will definitely be visiting again!
Buy Percocet Online
~ken~ Email
2016-2-12 00:37
Congratulation for the great post. Those who come to read your Information will find lots of helpful and informative tips.
Buy Xanax Online
分页: 6/9 第一页 上页 1 2 3 4 5 6 7 8 9 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]