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

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


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


Tags:
技术大类 » PHP/JS/Shell | 评论(174) | 引用(0) | 阅读(45366)
~ken~ Email
2016-2-12 01:07
Wonderful post. I am searching awesome news and idea. What I have found from your site, it is actually highly content. You have spent long time for this post. It's a very useful and interesting site. Thanks!
Buy Vicodin ES Online
~ken~ Email
2016-2-12 01:27
Thanks for your Information, I like your blog very much, Well done.
Buy K25 Online
ken Email
2016-2-12 02:25
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 Lortab Online
ken Email
2016-2-12 02:58
Good info and Thanks for this.
Buy Ritalin Online
ken Email
2016-2-12 03:25
Thank you for for sharing so great thing to us. I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post nice post, thanks for sharing.
Buy Valium Roche Online
ken Email
2016-2-12 03:54
This is really good information. Must agree that you are one of the coolest blogger I ever saw.
Buy Codeine Online
ken Email
2016-2-12 03:55
This is good site to spent time; I just stumbled upon your informative blog and wanted to say that I have really enjoyed reading your very well written blog posts. I will be your frequent visitor, that's for sure.
Buy Codeine Online
ken Email
2016-2-12 04:23
Really your blog is very interesting.... it contains great and unique information. I enjoyed to visiting your blog. It's just amazing.... Thanks very much.
Buy Adderall Online
ken Email
2016-2-12 05:11
I am also interested in this topic. I have spent a lot of time on searching this kind of topic. It is very informative.
Buy Hydrocodone Online
ken Email
2016-2-12 05:36
I am speechless after seeing these pictures! I love them all! I teach kindergarten and I'm going to make a theme, and photographs have given me so many ideas! You are so talented! Thanks!
Buy Phentermine Online
Curry Email
2016-3-3 23:23
Hey, its an amazing information dude. Thanks for sharing this great.
Drug Store
Curry Email
2016-3-4 00:35
Hello Dear, Really your blog is very interesting.... it contains great and unique information. I enjoyed to visiting your blog. Its just amazing.... Thanks very much.
Buy Medicine
Curry Email
2016-3-4 02:11
Awesome post, thanks so much for sharing this with us
Medicine Online
Abeewa
2016-3-23 01:08
Really your blog is very interesting.... it contains great and unique information. I enjoyed to visiting your blog. Its just amazing.... Thanks very much.
Buy Medicine Online
victor Email
2016-5-11 17:36
I often brow the webpage and buy Coach bags online.It is a symbol regarding position not to mention nature.Here I would like to launch a excellent bags pertaining to business men. Life Experience Degree
victorarnold85 Email
2016-6-9 23:17
The handmade coach products?can make you more charming and graceful.coach factory online provides people many coach goods. Life Experience Degree
dana Email
2016-6-9 23:19
The handmade coach products?can make you more charming and graceful.coach factory online provides people many coach goods. High School Diploma
Grey Homepage
2016-8-19 23:17
OMG,how to get your talent, I never seen before these kind of super work.
Buy Ritalin
Blake Homepage
2016-8-19 23:35
An extremely motivating story… awesome thanks to you and to every one of the general population who developed this site. Continue going and good fortune.
Blake Homepage
2016-8-19 23:35
I am spechless after see it,it has me given me such a large number of thoughts! You are so gifted! Thanks!
Xanax Pills
分页: 7/9 第一页 上页 2 3 4 5 6 7 8 9 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]