發表文章

目前顯示的是 2月, 2011的文章

[web design] alt vs title

ALT is a required element for images and can only be used for image tags because its specific purpose is to describe images. and title can use to describe all structural HTML elements. you can use the TITLE attribute for just about any page element.

[web design] 自動轉址

a,b 轉載自 : Openwebmail FAQ a. ---------------------------------------- <html><head> <meta http-equiv="Refresh" content="0;URL=http://your_server/cgi-bin/openwebmail/openwebmail.pl"> </head></html> ---------------------------------------- b. --------------------------------------- <html> <body onload= "window.open('http://your_server/cgi-bin/openwebmail/openwebmail.pl','_top')"> </body> </html> ---------------------------------------- 以下是其它寫法 (非Html) ---------------------------------------- c. PHP header 寫法 --------------------------------------- header("Location: https://fgps.tcc.edu.tw/cgi-bin/openwebmail/openwebmail.pl"); --------------------------------------- d. JavaScript 寫法 --------------------------------------- <script language="Javascript"> <!-- if (screen.width == "800") { location="fgps/800/index.php?link=index" } else { location...

[php] post重複傳送

弄了幾小時... 無法接受為什麼 unset($_POST) 還是無法消除POST內容 最後靠別人那偷來的程式碼搞定QQ < ? php session_start(); /** * 检查表单是否被重复提交 * 相同内容的表单在设定时间内只能提交1次 * @param int $iTimeOffset * @return bool */ function checkFormSubmit($iTimeOffset=60){ // 取得表单的标识 $idForm = md5(serialize($_POST)); // 是否需要表单提交检察 $iFormCheck = true; if (isset($_SESSION['formSubmitCheck'])){ // 删除过期的表单标识 foreach (array_keys($_SESSION['formSubmitCheck']) as $val){ if (time() > $val){ unset($_SESSION['formSubmitCheck'][$val]); } } }else { $_SESSION['formSubmitCheck'] = array(); $iFormCheck = false; } if ($iFormCheck == true){ // 检查是否有重复标识的提交记录 foreach ($_SESSION['formSubmitCheck'] as $val){ ...

[Ubuntu] some instructions

ps -l report a snapshot of the current precesses. pstree -Aup display a tree of processes. fg call job to run in font mode. bg call job to run in background mode. jobs list all jobs. & add this after an instruction, and job will run in background.