windk

2011年7月30日

PHP 截取中文字符串 UTF-8

摘要: $string = 'www.anbicheng.com 水晶 碧城 虎晶石,2称虎眼石、猫1石、木变2。asdasd种类包括有,s红虎眼、黄虎眼、红虎眼和蓝虎眼等。虎晶石,又称虎眼石、猫眼石、木变石。种类包括有,红虎眼、黄虎眼、红虎眼和蓝虎眼等。虎晶石,又称虎眼石、猫眼石、木变石。种类包括有,红虎晶石,2称虎眼石、猫1石、木变石虎晶石,2称虎眼石、猫1石、木变石虎晶石,2称虎眼石、猫1石、木变石虎晶石,2称虎眼石、猫1石、木变石';echo mb_substr($string,0,107,'UTF-8');//www.anbicheng.com 水晶 碧城 虎 阅读全文

posted @ 2011-07-30 01:35 windk 阅读(438) 评论(0) 推荐(0)

2011年7月6日

关于php的unset

摘要: php的unset很特别。简单的说:参考php手册:<?php/* Imagine this is memory map ______________________________|pointer | value | variable | -----------------------------------| 1 | NULL | --- || 2 | NULL | --- || 3 | NULL | --- || 4 | NULL | --- || 5 | NULL | --- |------------------------------------Create some var 阅读全文

posted @ 2011-07-06 18:37 windk 阅读(1256) 评论(0) 推荐(0)

2011年6月26日

win7 64 搭建 64 位 apache httpd php mysql

摘要: 下载软件1 mysql :http://mysql.com/downloads/mysql/2 apache httpd-2.2.19-win64.rarhttp://www.blackdot.be/?inc=apache/binaries3 php-5.3.6-Win32-VC9-x64.ziphttp://u.115.com/file/bhbzi39y来源是csdn,但是csdn下载 也不是原创,来源是http://www.anindya.com/4eAccelerator-0.9.6.1_php-5.3.6-Win32-VC9-x64.ziphttp://u.115.com/file/a 阅读全文

posted @ 2011-06-26 09:56 windk 阅读(4795) 评论(2) 推荐(0)

2011年6月20日

apache vhost 本地域名访问

摘要: NameVirtualHost *:80<VirtualHost *:80> DocumentRoot "D:\Program Files\Apache Software Foundation\httpd-2.2-x64\htdocs"</VirtualHost> <VirtualHost *:80> ServerAdmin whoever@site.com DocumentRoot "D:/city" ServerName www.xxx.com ServerAlias *.xxx.com <Directory 阅读全文

posted @ 2011-06-20 11:37 windk 阅读(1303) 评论(0) 推荐(0)

2011年6月13日

PHP 中国公民身份证号 验证

摘要: <?php/** * check string is a PRC ID num * 网上看到的,修正了一些bug,改写为类。 * * @author windk * @version 1.0 * date:2011-06-13 */class Idcheck { private $idNum; public function __construct($idNum) { $this->idNum = (string)$idNum; } public function isIdNum() { $idNum = $this->idNum; if (strlen($idNum) == 阅读全文

posted @ 2011-06-13 12:52 windk 阅读(823) 评论(1) 推荐(0)

导航