摘要
在开发网页和Web应用时,使用像用RAD工具开发Windows应用程序一样的事件处理机制来响应网页加载、按钮点击等事件会使得页面的程序结构规整清晰,提高页面代码的可读性和可重用性。文中提出了一个在PHP编程中非常简单易行的事件机制的实现方法,并给出了示例代码及注释。
It is well - known that the structure of a Web application coded with event mechanism to process some events such as loading a page, clicking a button and changing the selection of a drop - down box could be clearer, more readable and more reusable than the one coded simply with sequential sentences. So,a solution for implementing PHP event mechanism is brought forth in this paper;meanwhile,some illustrational codes and essential comments are provided.
出处
《计算机技术与发展》
2006年第10期68-70,73,共4页
Computer Technology and Development
关键词
PHP
事件
隐藏域
串行化
正则表达式
PHP
event
hidden field
serialization
regular expression