无限空间的Smugmug相册
注册快速, 强大, 无限流量, 收费的Smugmug相册时别忘记输入优惠码: VczUYd6cAcQnI
能为你优惠5美元, 同时提供14天试用, 信用卡支付 Smugmug的首页地址是http://www.smugmug.com
我已经是第三年续费了 点此查看我和Smugmug的故事This is me
Categories
Recent Comments
- Valencia on In BCP command, database name and table name must begin with letter or underscore, and can’t contains hyphen.
- concrete driveway on In BCP command, database name and table name must begin with letter or underscore, and can’t contains hyphen.
- Marissa on In BCP command, database name and table name must begin with letter or underscore, and can’t contains hyphen.
- chinalv on 3个较好用的免费DDNS提供商
- 40m Rafael Correa libel victory on 春季也是收获季–收获香菜
- Highly recommended Reading on MediaWiki实现短Url
- Jerlene Emenaha on Flickr Pro
- http://kthkrynica.cba.pl/profile.php?mode=viewprofile&u=1848 on 12306订票助手
- Klaus on 3个较好用的免费DDNS提供商
- iworm on 电脑的网络唤醒(Wake On Lan)及关机
Blogroll
Tags
2009 apache blog bluehost bt compare decoration design dog domain download e70 eclipse emule error Firefox food free ftp Google google talk health home house install life Linux Microsoft mobile net network nokia password pet php sanya shanghai skype svn symbian travel twitter ubuntu windows Wordpress
Tag Archives: php
PHP substr 截取 UTF8字符串乱码的解决
PHP的substr方法可以按照字节来截取字符串, 对于英文来说是没问题的. 因为一个英文字符只占一个字节. 但是对于截取UTF8编码的中文就会存在问题. 比如: var $str = ‘我爱twitter哈哈’; echo substr($str, 0, 1); 就会出现一个乱字符, 因为在php中, utf8编码的中文是占3个字节, 单单只取一个字节肯定是不行啦. 如果: echo substr($str, 0, 3)就会出现”我” echo substr($str, 0, 9) 会出现”我爱twi” 在中英文混排的时候, 这个函数就显得无能为力了. google了一下, 发现很多人写了替代方法, 比如自己去实现一个substr, 里面写循环. 这样肯定效率低下, 直接用substr的复杂度是1, 而自己写循环, 复杂度就是n了. 后来找到了Wikipedia的条目, 发现原来3字节的utf8编码是有规律的. 一个非英文字符的3-bytes … Continue reading
How to: Implement Dynamic Route in CakePHP
I’ve found a method to implement Dynamic Route in CakePHP. If we develop a CMS program using CakePHP, we often let people to define their menu code. The menu code basically is the URL path. For example: An admin create … Continue reading
Ubuntu中完全删除Apache2的办法
Ubuntu安装Apache2很简单,只需要sudo apt-get install apache2 但是我使用sudo apt-get remove apache2之后,说只能释放零点几k的空间,而且删除之后仍然能访问到apache服务器,可见没删掉。 后来我看到apt-get 还有个参数是autoremove,即sudo apt-get autoremove 这下就删掉了,释放了37M空间。 自己安装LAMP麻烦,推荐安装XAMPP,装好之后LAMP都有了,而且PHP还带有很多常用的库,Apache也是带SSL的,还有FTP服务。
