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

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


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


Tags:



技术大类 » PHP/JS/Shell | 评论(194) | 引用(0) | 阅读(77706)
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
smith Email
2019-5-9 18:50
Sample Assignment is a renowned for assignment writing help and has assisted thousands of international students with their academics. Our dedicated team of experts has been providing full-fledged assignments to students pursuing their courses at various colleges and universities, and found to be avidly googling networking assignment help across the continent. While Australia is among the most preferred destinations for individuals from around the world, Assignment Experts has also won the trust of a vast pool of students here. The Australia Assignment help, such as Sample Assignment, can be easily contacted via WhatsApp and Messenger too. With our 24-hour online academic assistance, any student can reach out to us whenever he or she is in the need of help of a other subject expert like Psychology assignment help expert.
hamello Email
2020-2-1 00:15
Evet admin sizlere mobil sohbet bedava.https://tiklamobil.com
akif Email
2020-2-5 04:04
Evet admin Mobil Sohbet文字mobil sohbet
akif Email
2020-2-5 04:06
evet değerli dostlar, Cinsel SohbetCinsel Sohbet evet cinsel olarak mobil de var sohbet, Mobil Sohbet evet yaw, tiklamobil
islami Email Homepage
2020-2-27 05:29
islami Chat
islami Email Homepage
2020-2-27 05:32
islami sohbet katıla bilirsiniz  https://www.islamisohbet.org
Burcu
2020-3-23 06:58
Thanks : ) Arkadaş Arıyorumhttps://sesliarzu.com
shz Email
2022-7-4 19:02
I want to say thanks to you. I have bookmark your site for future updates.  Digital real estate business
shz Email
2022-7-4 19:06
Welcome to the party of my life here you will learn everything about me.  Digital real estate business
shz Email
2022-7-4 19:10
Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post.  Digital real estate business
shzz Email
2022-7-4 19:12
I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks  Digital real estate business
shz Email
2022-7-4 19:14
This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses.  Digital real estate business
shz Email
2022-7-4 19:18
Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.  Digital real estate business
分页: 9/10 第一页 上页 4 5 6 7 8 9 10 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]