- 博客(14)
- 资源 (4)
- 收藏
- 关注
原创 UTF8转unicode
/** * UTF8转unicode * @param unknown_type $c */function utf8_unicode($c) { switch (strlen ( $c )) { case 1 : return ord($c); case 2 : $n = (ord ( $c [0] ) & 0x3f)
2010-08-31 15:16:00 429
原创 判断是否为英语(拉丁语)
<br />/**<br /> * 判断是否为英语(拉丁语)<br /> * @param unknown_type $str<br /> */<br />function is_eng($str){<br /> $unicode = utf8_unicode($str);<br /> if($unicode >= 0x20 and $unicode <= 0x7e){<br /> return true;<br /> }<br /> if($unicode >= 0xa0 and $unicode <=
2010-08-31 15:16:00 937
UTF8转unicode
/*** UTF8转unicode* @param unknown_type $c*/function utf8_unicode($c) {switch (strlen ( $c )) {case 1 :return ord($c);case 2 :$n = (ord ( $c [0] ) & 0x3f) << 6;$n += ord ( $c [1] ) & 0x3f...
2010-08-31 15:16:00 79
判断是否为英语(拉丁语)
/*** 判断是否为英语(拉丁语)* @param unknown_type $str*/function is_eng($str){$unicode = utf8_unicode($str);if($unicode >= 0x20 and $unicode <= 0x7e){return true;}if($unicode >= 0xa0 and $unicode <= ...
2010-08-31 15:16:00 370
原创 中英文一块拆解的巨牛的PHP分解字符串函数
function str_split_utf8($str) { $split=1; $array = array(); for ( $i=0; $i 127){ if($value >= 192 && $value = 224 && $value = 240 && $value
2010-08-31 12:42:00 711 1
中英文一块拆解的巨牛的PHP分解字符串函数
function str_split_utf8($str) { $split=1; $array = array(); for ( $i=0; $i < strlen( $str ); ){ $value = ord($str[$i]); if($value > 127){ if($value >= 192 && $v...
2010-08-31 12:42:00 76
转载 Linux下查看apache连接数
查看httpd进程数(即prefork模式下Apache能够处理的并发请求数):Linux命令: ps -ef | grep httpd | wc -l查看Apache的并发请求数及其TCP连接状态:Linux命令: netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'返回结果示例: LAST_ACK 5 SYN_RECV 30 ESTABLI
2010-08-22 16:17:00 394 1
Linux下查看apache连接数
查看httpd进程数(即prefork模式下Apache能够处理的并发请求数):Linux命令:ps -ef | grep httpd | wc -l查看Apache的并发请求数及其TCP连接状态:Linux命令:netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'返回结果示例: ...
2010-08-22 16:17:00 54
转载 缓存2(SQL_NO_CACHE和SQL_CACHE 的区别)
<br />可以在 SELECT 语句中指定查询缓存的选项,对于那些肯定要实时的从表中获取数据的查询,或者对于那些一天只执行一次的查询,我们都可以指定不进行查询缓存,使用 SQL_NO_CACHE 选项。<br />对于那些变化不频繁的表,查询操作很固定,我们可以将该查询操作缓存起来,这样每次执行的时候不实际访问表和执行查询,只是从缓存获得结果,可以有效地改善查询的性能,使用 SQL_CACHE 选项。<br />下面是使用 SQL_NO_CACHE 和 SQL_CACHE 的例子:<br />mysql>
2010-08-18 15:57:00 717
缓存2(SQL_NO_CACHE和SQL_CACHE 的区别)
可以在 SELECT 语句中指定查询缓存的选项,对于那些肯定要实时的从表中获取数据的查询,或者对于那些一天只执行一次的查询,我们都可以指定不进行查询缓存,使用 SQL_NO_CACHE 选项。对于那些变化不频繁的表,查询操作很固定,我们可以将该查询操作缓存起来,这样每次执行的时候不实际访问表和执行查询,只是从缓存获得结果,可以有效地改善查询的性能,使用 SQL_CACHE 选项。下面是使用...
2010-08-18 15:57:00 52
转载 截取mysql 慢语句
<br />最近和开发、DBA一起对MYSQL作性能调优,发现几个点对抓取MYSQL慢语句很有帮助<br />在/etc/my.cnf 文件加入<br />log_slow_queries<br />log-queries-not-using-indexes<br />log_long_format<br />long_query_time=1<br /> <br />将在mysql数据目录下( datadir = /home/mysql ) 生成一个如test-slow.log的文件,内容有:<br />
2010-08-18 15:23:00 995
截取mysql 慢语句
最近和开发、DBA一起对MYSQL作性能调优,发现几个点对抓取MYSQL慢语句很有帮助在/etc/my.cnf 文件加入log_slow_querieslog-queries-not-using-indexeslog_long_formatlong_query_time=1将在mysql数据目录下( datadir = /home/mysql ) 生成一个如test-slow.lo...
2010-08-18 15:23:00 58
原创 PHP5.3.3的重要更新
<br />Backwards incompatible change:Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn't affect non-namespaced classes.<br /><?php<br />namespace Foo;<br />class Bar {<br
2010-08-09 17:11:00 515
PHP5.3.3的重要更新
Backwards incompatible change: Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn't affect non-namespaced classes....
2010-08-09 17:11:00 66
【小强类】TBS使用手册.rar
2008-08-26
WebFrame论坛
2007-08-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人