原文来自于:http://thisinterestsme.com/php-best-practises/ There are a number of good practises that you should follow when developing web applications in PHP. Most of these are extremely easy to pick up and some of them will even apply to web application
构建一个表单 这是一个非常简单的表单.实际应用中,一个表单可能包含几十上百个字段,其中大部分需要预填充,而且我们预料到用户将来回编辑-提交几次才能完成操作. 我们可能需要在表单提交之前,在浏览器端作一些验证.我们可能想使用非常复杂的字段,以允许用户做类似从日历中挑选日期这样的事情,等等. 这个时候,让Django 来为我们完成大部分工作是很容易的. 在Django 中构建一个表单 Form 类 我们已经计划好了我们的 HTML 表单应该呈现的样子.在Django 中,我们的起始点是这里: for