2012-10-30
2012-10-29
2012-10-20
2012-10-18
2012-10-17
2012-10-16
2012-10-15
LINUX - 讓 error log 有顏色
example :
ref
http://chunchaichang.blogspot.tw/2011/07/printf.html
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
Util_Reporter::log(LOG_MARK."\033[1;31m LIGHT_RED \033[m !!!", LOG_PATH); Util_Reporter::log(LOG_MARK."\033[1;32m LIGHT_GREEN \033[m !!!", LOG_PATH); Util_Reporter::log(LOG_MARK."\033[1;34m LIGHT_BLUE \033[m !!!", LOG_PATH); Util_Reporter::log(LOG_MARK."\033[1;33m YELLOW \033[m !!!", LOG_PATH); Util_Reporter::log(LOG_MARK."\033[1;35m Light Purple \033[m !!!", LOG_PATH); Util_Reporter::log(LOG_MARK."\033[1;36m Light Cyan \033[m !!!", LOG_PATH); Util_Reporter::log(LOG_MARK."\033[1;37m WHITE \033[m !!!", LOG_PATH);
ref
http://chunchaichang.blogspot.tw/2011/07/printf.html
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
2012-10-14
2012-10-13
CODE - php 字串取代
example :
$path = '/home/nas/webhd_14/e2/c3/10107664/50012/sync/a3/string'; $path = preg_replace('/home\/nas/', 'net', $path); # output: /net/webhd_14/e2/c3/10107664/50012/sync/a3/string
$str = 'hello.@.@world'; $key = preg_replace(array('/\./', '/\@/'), '_', $str); # output: hello||||world
2012-10-09
2012-10-08
2012-10-04
2012-10-01
訂閱:
文章 (Atom)