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

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


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


Tags:
技术大类 » PHP/JS/Shell | 评论(174) | 引用(0) | 阅读(44044)
dc locksmith
2012-10-26 05:51
Preservation and promotion of health is achieved through a combination of physical, mental and social well-being, sometimes called "the triangle of health." Health is a positive concept focuses on the social and personal resources, as well as physical capacities. dc locksmith
friv games Email Homepage
2012-11-4 08:13
This is a nice blog i must say, usually i don't post comments on others' blogs
friv games Email Homepage
2012-11-4 08:14
This is a nice blog i must say, usually i don't post comments on others' blogs
CVFDZB
2012-11-21 10:23
You could make some sort of crownless model of George Washington's three-cornered cheap hats quickly, making use of construction paper. Utilize it for a college perform or maybe a costume party. It will carry collectively for a minimum of 2-3 makes use of, or perhaps laminate flooring the three pieces that can end up being the factors on the hats factory when you assemble this should you prefer a stronger version. If you want to generate a experienced model, your own document cheap hats online has to be your design template.
mucher Email
2012-11-21 17:58
您好!这是我第一次访问到您的博客!我们是一个团队的志愿者和在同一地位的新举措。博客给了我们工作的有用的信息。你已经做了了不起的工作!  gosip artis terbaru |  kitchen design ideas for small kitchens designs cry
Elephant Email Homepage
2012-11-27 06:46
The tiger in our hearts, 1981 market share the ASIC ASIC ASIC production, the company in recent years in the bottom of the For your feet shoes really feel comfortable and safe. No loose and heavy really think that, because the product is really in the feet feel satisfied. cam balkon cam balkon
Emecra Email Homepage
2012-11-27 23:40
I am very enjoyed for this side. Its a nice topic. Its opportunity are so fantastic and working style so speedy. gelinlik gelinlik modelleri
China Email Homepage
2012-11-27 23:50
Today, following half a century, mentor yemek leather-bases coach factory outlet continues to be the delicate craft yemek şirketleri of leather-based master is accountable for,Would you like to meet more friends, or go with the times? If yes, coach factory online is opening welcome doors to you.in the market you definitely can find various colorways that are designed in as well as tabldot yemek the high quality that applied in. For most of you would like to come. So just come to our coach factory outlet online store to choose one.
John Email Homepage
2012-11-27 23:52
coach outlet has yemek become a popular shopping experience for consumers yemek şirketleri around the world, and a desirable distribution channel for manufacturer's and retailers.Getting your hands on coach outlet store online can be a tabldot yemek hefty investment of hundreds of dollars.But do not despair,the Coach yemek firmaları Outlet store could be the answer to your prayers.coach outlet online is your smart choice when you want to get the discount Coach accessory. You can find the exact Coach Bags and other accessory you want at a low price that's right for you. My dear friends, let the coach outlet online pave your way into the world of high fashion with their ultimate fashion factory.
Ethan
2012-12-6 23:15
I'm still learning from you, but I'm trying to achieve my goals. I certainly enjoy reading all that is posted on your blog.Keep the information coming. I loved it!     locksmith washington dc
mary
2012-12-7 00:36
Hello Dear,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 replace ignition
Ethan
2012-12-7 01:29
Hello, an amazing article dude. Thanks But Were issues in your rss . Dont know why Unable to subscribe to it. Could there be others having similar RSS trouble? Anybody nobody can assist please reply. Thnx! Ignition lock
car
2012-12-7 02:58
This is a really good site post, im delighted I came across it. Ill be back down the track to check out other posts.car locksmith
Ethan
2012-12-7 03:53
This site is excellent and so is how the subject matter was explained. I also like some of the comments too.Waiting for next post. fha mortgage loan
Ethan
2012-12-7 05:33
This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.online home loans
Ethan
2012-12-7 06:16
My partner and I stumbled over here from a different web page and thought I might check things out. I like what I see so now i am following you. Look forward to going over your web page repeatedly.online home mortgage
Nico
2012-12-7 18:38
They use all natural ingredients to create organic products.
rug cleaning washington dc
Nico
2012-12-7 19:07
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.
change locks
morova Email
2012-12-10 14:52
感谢您的发布。负载出色的写作。 free ebook topics   我想我已经发现这个网站更快
xiaojiecmm Email Homepage
2012-12-10 19:18
"He’s a guy that’s getting overlooked down there," Mankins said. "J.J. Watt’s getting a lot of attention deservedly, but Antonio Smith’s a very good player. He’s a slippery guy inside that has good quickness, good power and he really understands how to work blockers, so he does a good job.
Despite playing a pivotal part in the Patriots’ top-ranked offense and valiantly protecting quarterback [] amid constant change due to injuries, the Patriots offensive line certainly will be bolstered with Mankins out there as they prepare to face their stiffest test of the season.
"It’s been a couple games here and then miss a couple and then a couple here, miss a few. It’s just one of those years I can’t get on track yet," he said. "Every game you want to be out there, you just got to wait until you’re ready to get out there."
Mankins, a four-time Pro Bowl player, has missed five games this season with various ailments, the second-most of his eight-year career.
So, imagine the big boost the Patriots will receive from having one of their best players on each side of the ball return for what is being billed as the game of the year.
His status, he said,Julio Jones Womens Jersey, rests in the hands of coach .
"Just got out there a little bit this week and tried to move around. We’ll see where it goes from today," said Mankins, who injured his ankle in the second half of New England’s victory over Buffalo on Nov. 11 and has missed the last three games. "We were just trying to do as much as we can. I can’t do everything yet, so I guess we might find out Monday."
The pair couldn&rsquo,Matt Schaub Youth Jersey;t have picked a more perfect time to return, either.
Jones, the 21st overall selection in the draft and considered by many to still be a top candidate for Defensive Rookie of the Year honors with six sacks, skipped the last two games with an ankle injury suffered during the first quarter of the Patriots (9-3) win over Indianapolis on Nov. 18.
After practicing in a limited capacity all week, starting left guard [] and standout rookie right defensive end Chandler Jones are both listed as questionable for Monday night’s much-hyped matchup against the first-place Houston Texans [] (11-1), a game with major playoff ramifications for both teams.
"They get ahead and teams have to start throwing it to catch back up, so that plays right into their strength. They’re a great pass-rushing team."
Watt’s sensational season also has overshadowed the strong play of defensive end Antonio Smith, who has five sacks of his own, along with Watt forming one of the most feared pass rushes in the league.
And a large chunk of their recent run has come without two of their top players.
FOXBOROUGH - With six straight victories and their fourth consecutive AFC East title already wrapped up, the New England [] are playing perhaps their best football of the season.
"Ready to play against the Texans," Jones said. "We went out there and we won a championship and I wasn’t out there. But I’m still thankful to be a part of this team."
Houston defensive end J.J. Watt is wreaking havoc on just about every opposing offense he’s faced thus far. The second-year standout ranks second in the league with 16 1/2 sacks and has knocked down 15 passes this year.
Related articles:

  
   http://a6688.why3s.tw/read.php?4549
分页: 3/9 第一页 上页 1 2 3 4 5 6 7 8 9 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]