Category Archives: 網頁撰寫

[WordPress] A Method for combining both of plain and custom URLs

In WordPress, we usually set the custom URLs for the purpose of SEO.For the old plain URLs which are previously published to other sites, we should maintain them by redirecting to the new custom URLs. The htaccess setting can simply … Continue reading

Posted in PHP, Web Design, wordpress, 程式設計, 網頁撰寫 | Leave a comment

Google表單自動寄信給填表人

2013/09/15 updated: 由於sheet的API呼叫跟Form的呼叫API不同,這邊加入Google表單的範例。2015/02/27 updated: Google Docs的API改版了,筆者已經發布新版的寫法,請移駕至此。現在網路上教的Google Docs問卷,都只有填表格功能,難道沒有讓使用者填寫完資料後,寄一份資料到使用者信箱的功能嗎?因為我們有時候需要製作收據系統之類的…。 答案是有的!我們只要動幾根手指頭,依照下列步驟,就可以輕易開發出這個功能喔!請依照以下步驟一步一步跟著我做即可。請注意,如果是直接用Google表單的話,請注意第三步驟有些不同。 開發步驟Step 1. 先開啟Google試算表。 Step 2. 假設我的表單只有兩個欄位:姓名與Mail。按上方工具列,選擇工具→表單→編輯表格,先建立表單內容,然後按下存檔。 Step 3. 回到Google表格編輯頁,這次請選擇工具→指令碼編輯器,出現程式碼視窗後,輸入下列程式碼,如圖 2 (標題與內容請自行修改),這邊有Google試算表跟表單兩種不同API實現方式,請注意一開始是使用Google表單還是試算表製作: (Google試算表版本) (Google表單版本) Step 4. 接著在工具列上面,選擇”觸發器”→現有指令碼的觸發程序 Step 5. 由於現在都沒有加入任何觸發器,因此我們可加入一個新的。 (1) 請點選”Add a new trigger”連結 (2) 設定執行的函式為sendMails,Events 來源為From spreadsheet,動作為On form submit,然後儲存關閉。 這樣子就大功告成了! 實際測試 … Continue reading

Posted in cloud computing, 程式設計, 網路, 網頁撰寫 | 61 Comments

[Windows] Port 80被佔用導致Apache無法啟動

我們在Windows上使用AppServ架設網頁服務時,有時候會發現Port 80被佔用,導致無法啟動的狀況。 面對這樣子的窘境,可以參照以下步驟來執行: 開啟命令提示字元視窗,輸入以下指令:netstat –ano ,找出佔用Port 80的程式PID 開啟「工作管理員」,到「處理程序」標籤,按上方的「檢視」→「選擇欄位」,把PID選項勾選起來。 看看是哪一個Service佔用了80 Port? 就處理處理一下吧。 一般而言,最常發生Skype佔用80 Port的狀況,若發生此狀況,請參考這邊的解決辦法。     倘若發現PID = 4,且來源是NT Kernel佔用的話,請別急著把它砍掉。     請下達以下指令: net stop http Sc config http start= disabled    (注意,這一行請完整複製,大小寫與空格都有差異) 完成後,最好重新開機一下,這樣子問題應該就解決了。 參考資源 Getting Apache to run on port 80 on … Continue reading

Posted in Windows, 程式設計, 網路, 網頁撰寫 | 11 Comments

AngularJS: The framework of JS based on MVC

在許多Javascript MVC的framework中,除了ExtJS、Backbone.js、YUI、EmberJS以外,AngularJS 也是目前最被熱烈討論的Javascript MVC framework之一。他除了有Google大神的支持以外,也使用MIT授權協議,逐漸成為商業產品的熱門選擇。 如果各位有興趣的話,可以先看以下Slides介紹,再搭配Will保哥的介紹文服用。 相關連結: AngularJS: Overview 前端工程的極致精品: AngularJS 開發框架介紹 AngularJS中文電子書 (推薦)

Posted in Programming, 程式設計, 網頁撰寫, 資工 | Leave a comment

[Web] How to force browsers not to cache your website?

I’ve found the useful meta tag information, and you just add the information inside “head” tag. <meta http-equiv=”no-cache”><meta http-equiv=”Expires” content=”-1″><meta http-equiv=”Cache-Control” content=”no-cache”><meta http-equiv=”Pragma” content=”no cache”> Cheers.

Posted in Programming, Web Design, 網頁撰寫 | Leave a comment

Themes for Drupal 7.

I’ve found these interesting themes which may be suitable for my projects I encountered. http://drupal.org/project/boldy http://drupal.org/project/adaptivetheme http://drupal.org/project/corporateclean http://drupal.org/project/journalcrunch And, there are some major companies which have expertise in Drupal theme design I focused: http://www.siliconinfo.com/drupal-web-development-developer/detroit-metro-drupal-programmer-drupal-web-developer.html http://kaolti.com/ If anyone wants to find … Continue reading

Posted in Drupal, Web Design, 網頁撰寫 | Leave a comment

[PHP] Solution for the Message in PHPMyAdmin: Query was empty!

During the few days, I’ve encountered a problem for operating PHPMyadmin at my workstation. It is very strange situation while  clicking the viewing button in PHPMyadmin. Whenever I click the viewing button, the result is always the shown message with … Continue reading

Posted in PHP, 程式設計, 網頁撰寫 | Leave a comment

[PHP] 將_GET與 _POST陣列的變數,轉為全域變數的兩種作法

因為最近要改別人寫的舊專案,該專案的寫法為需要將_GET與_POST陣列的變數,改為全域變數。也就是說,我們可以用$register 直接存取$_GET[‘register’]; 像這類的要求,可以分為兩種解決方法: 1. 如果管理員有給.htaccess操作的權限:那麼,可以在.htaccess加入以下語法: php_value register_globals Onphp_flag register_globals On 2. 如果管理員沒有給.htaccess操作的權限: 我從這篇得到的方法,只要寫一個set_globals.php的程式,程式碼內容如下: 每當有程式要執行時,先加一句 require(‘set_globals.php’); 或include(‘set_globals.php’); 引入該檔案即可。 參考資料[程式][PHP] 如何快速接收POST或是GET的變數,並轉存。

Posted in apache, PHP, 網頁撰寫 | Leave a comment

[Chrome] The Useful Materials of Chrome Storage

  Congratulations! The number of users for my developed Chrome extension:Yahoo Dictionary (The Chinese name is “Yahoo字典查詢器“) has been over 540 users. The next version 0.3 will have some important features: Store the searched word to construct user’s learning records. Customize … Continue reading

Posted in ajax, browser, chrome, cloud computing, jQuery, 網頁撰寫 | Leave a comment

[Java] Lucene Tutorial

Lucene is one of important search engines. It provides grate search performance and easy implementation.Here are some tutorials of Lucene :1. Create your own search engine (Traditional Chinese)2. Discover the Lucene full-text search library3. A Short Introduction to Lucene4. An Introduction to Apache … Continue reading

Posted in Java, 網頁撰寫 | Leave a comment