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

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


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


Tags:



技术大类 » PHP/JS/Shell | 评论(194) | 引用(0) | 阅读(77701)
Blake Homepage
2016-8-19 23:43
Ordinarily I dont read review on web journals, however I wish to say that this review truly constrained me to attempt and do as such! Your written work style has been amazed me. Much appreciated.
Xanax 2mg
Blake Homepage
2016-8-19 23:57
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.
Buy Xanax Online
Blake Homepage
2016-8-20 00:04
Ordinarily I dont read review on web journals, however I wish to say that this review truly constrained me to attempt and do as such! Your written work style has been amazed me. Much appreciated.
Alprazolam Xanax
Grey Homepage
2016-8-20 00:09
This site made my life more successful.
Methylphenidate 10 mg
Blake Homepage
2016-8-20 00:12
I am spechless after see it,it has me given me such a large number of thoughts! You are so gifted! Thanks!
Alprazolam 2 mg
Grey Homepage
2016-8-20 00:24
I am totally satisfy with your informatic data, very usefull things I got.
Buy Ritalin Online
Grey Homepage
2016-8-20 00:43
Very fascinating site. Alot of sites I see now a days do not generally give anything that I am intersted, however I am most definately interested by this one. Recently felt that I would post and let you know.
Ritalin Pills
Grey Homepage
2016-8-20 00:56
I can see that you are a specialist at your field, and your data will be extremely helpful for me.
Valium 10mg
Grey Homepage
2016-8-20 01:13
Thanks for all your help and wishing all of you the accomplishment in your business.
Diazepam Valium
Grey Homepage
2016-8-20 02:39
All qualities are best in your site data.
Valium Pills
Grey Homepage
2016-8-20 02:55
This information awesome guide for us.Good work!
Buy Valium Online
Grey Homepage
2016-8-20 03:04
The most Important skill in this site  is Learning, how to do good work.
Buy Adderall
Grey Homepage
2016-8-20 03:17
Awesome tips in this site for everybody.keep it up!
Adderall 30 mg
Grey Homepage
2016-8-20 03:26
All things are fabulous, love to see your work.
Adderall Pills
Grey Homepage
2016-8-20 03:47
Why your site is good from my site, it's really awesome.i learnt too much things from your site.
Buy Adderall Online
Eagle Email
2016-8-23 01:01
Very interesting subject  value it for posting. The great leaders have always stage-managed their effects.
Buy Hydrocodone Online
Eagle Email
2016-8-23 01:19
I am cheerful when perusing your online journal with upgraded data. much appreciated a lot and trust that you will post more site that are identified with this site.
Hydrocodone 10/325
Eagle Email
2016-8-23 01:24
Your online journal is so interesting and extremely informative. Thanks sharing. Without a doubt an incredible bit of work Thanks for your work.
Watson 853 Pill
Eagle Email
2016-8-23 02: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.
Watson Online
Eagle Email
2016-8-23 02:47
Great site.Your written work is so vastly improved contrasted with most different writers.
Percocet 10
分页: 8/10 第一页 上页 3 4 5 6 7 8 9 10 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]