test

[code language=php] function foo() {   echo “Hello World!\\n”; } [/code] 2/20 3/29 5/11 5/18

設定 .htaccess 讓 網址比較短

CodeIgniter – Open source PHP web application framework 設定 .htaccess 讓 網址比較短 codeigniter 網頁提到 http://codeigniter.com/user_guide/general/urls.html 可以把www.your-site.com/index.php/news/article/my_article 變成 www.your-site.com/news/article/my_article 步驟: 改 apache 的 virtual host file Options FollowSymLinks 在 /xxx/username/ci/ 下建…Continue Reading …

check email 存不存在

if ($_SERVER[argc]<2) { printf(“Usage : %s filename\n”,$_SERVER[‘argv’][0]); exit; } $filename=strftime(“%H%M.txt”); $out=fopen($filename,”a”); $counter=0; $fp=fopen($_SERVER[‘argv’][1],”r”); while ($data=fgets($fp,2000)) { $data=str_replace(“\r”,””,$data); $data=str_replace(“\n”,””,$data); if (checkmail($data)==TRUE) { printf(“%s : %s \tGOOD_EMAIL!\n”,$counter,$data); fputs($out,$data.”\n”); } else printf(“%s :…Continue Reading …

用 apache 的 setenv module 在程式中加入判斷 developer 是誰

<VirtualHost 172.30.0.35:80>         ServerName rimmon.goods.dev.xxx.com.tw         ServerAdmin webmsater@staff.xxx.com.tw         DocumentRoot /home/rimmon/bid/goods/www         SetEnv DEVELOPER rimmon         alias /js/ /home/rimmon/bid/www/www/js/         alias /css/ /home/rimmon/bid/www/www/css/         <Directory “/home/rimmon/bid/goods/www”>           Options  FollowSymLinks          …Continue Reading …

[sparc] solve gentoo blocking problem

emerge -pv …… [ebuild     U ] app-shells/bash-3.2_p33 [3.1_p17] USE=”nls -afs -bashlogger -plugins% -vanilla” 2,564 kB [blocks B     ] <sys-apps/portage-2.1.4_rc1 (is blocking app-shells/bash-3.2_p33) [blocks B     ] sys-apps/mktemp (is blocking sys-apps/coreutils-6.10-r2) [blocks…Continue Reading …

改 mysql 欄位寬

 ALTER TABLE `tbl_item` CHANGE `objno` `objno` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL