All business logic should be in classes, and if you absolutely had to have code in your JSP page, you would wrap it up in a custom tag.
所有的商业逻辑都应该在类中,如果你确实需要在你的JSP页面中包含代码,你应该用自定义标签来包装它。
For this example, in which the database query only returns the rows of a single table, you might just write a small PHP function to wrap each column in an XML tag.
在本例中,数据库查询只返回单个表的行,您也许要编写一个php小函数对XML标记中的每一列进行打包。
You can wrap that call with the tag to make it easier to digest the information.
您可以用标记约束该调用,使得按格式显示信息更为容易。
应用推荐