Category Archives: Web Design

[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

HTML Specification Standard

https://html.spec.whatwg.orgThe version of HTML specification description is greater than W3C’s.

Posted in HTML, Web Design | 1 Comment

[Software] Pencil Project

Web developers can try the Pencil Project. It offers not only a GUI to design the webpages, but also exports all of the webpages to a single web page. These features help you a lot to present your designed pages … Continue reading

Posted in Software, Web Design | 870 Comments

An easy way to fix SQL injection and XSS

In my current case, I find some PHP codes have flaws in SQL injection and  XSS. After analyzing the codes, I find that the URL pameters are usual in numeric type. So, I just add the codes in the PHP … Continue reading

Posted in PHP, Web Design | Leave a comment

[ASP.NET] ASP.NET撰寫時應注意的觀念

有撰寫過PHP/JSP/ASP網頁程式設計的人員請注意! ASP.NET 使用Window Form的設計模式與一般我們在使用GET/POST表單傳遞方式不一樣。 請謹記以下6個基本要點,以免到時候撰寫程式時卡東卡西的。 1. ASP.NET 採用的Window Form,預設會塞一個Form表單在裡面,請勿另外自己撰寫<form>… </form>標籤。 2. ASP.NET 控制項所有的操作,都是自動作用在自己這張頁面中(自己傳給自己)。採用的方式即是所有的動作都使用表單傳回給自己。例如,在ASP.NET專案的Default.aspx 加入以下: <asp:button id=”button1″ click=”button1_click(xxx…)”></button> 它的button1_click事件,是自動傳參數給本身的頁面(Default.aspx),頁面在接收到傳遞的資訊後,再執行click事件所委派的方法。 3. 按照ASP.NET執行流程,會先執行Page_Load方法,再依序初始化控制項,並執行其他方法。 4. 承3,由於每個動作都會引發Page_Load方法,所以要判定是否第一次存取頁面,請善用if ( this.IsPostBack … )這個判斷式,如果回傳false,代表第一次讀取頁面。若回傳true,代表第二次之後的頁面讀取。 5. 學習ASP.NET時,會使用ViewState[]、Session[] 與 Application[] 這幾個變數。差別如下:    (1) ViewState[] 是將變數內嵌在html程式碼中,以<input type=’hidden’ … >的方式存在。因此,不能跨頁面存取。這類變數只能在自己本身的頁面內做存取。   (2) … Continue reading

Posted in ASP.NET, Programming, Web Design, 程式設計 | Leave a comment

[Javascript] JSONP: some useful tutorials

If you want to know the detail process of JSONP(JSON with Padding).There are some useful web pages: [JSONP] Use jQuery + JSONP + ASP.Net to get data via  the cross-domain way. ( in Chinese) Cross-Domain Ajax (JSONP) (in Chinese)

Posted in ajax, jQuery, Programming, Web Design | 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

[PHP] MySQL Backup by GMail

[Chinese]        先前已經介紹過有一個好用的MySQL資料庫備份工具(使用PHP):MySQLDump。但是預設的寄信函式,是透過SMTP伺服器寄信,這對於沒有SMTP伺服器的使用者而言,可就傷腦筋了。原先我有找到一篇教學,使用GMail的SMTP伺服器做備份,可惜連結已經失效了。筆者只好自行撰寫,由於程式碼使用GPL授權,基於分享的精神下,便公開給各位。         程式碼下載處:請按我。 [English]I’ve introduced an useful backup tool for backuping MySQL databases (using PHP): MySQLDump. However,the default send mail function uses the SMTP server to send mails, and it may cause some problems … Continue reading

Posted in PHP, Programming, Web Design, 科技, 程式設計, 軟體(Software) | Leave a comment

Themes for Drupal 7.

I’ve found these interesting themes which may be suitable for my projects I encountered. And, there are some major companies which have expertise in Drupal theme design I focused: If anyone wants to find … Continue reading

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