有没有PHP HTML标签库? [英] Is there a PHP HTML tag library?
问题描述
是否有一个PHP HTML标记库用于执行服务器端HTML标记? Java和ASP.NET有这些,但这些都是编译langs与脚本。例如,在ASP.NET中,您可以使用以下方式定义文本框控件:
Is there a PHP HTML tag library for doing server-side HTML tags? Java and ASP.NET have these but those are compiled langs vs. scripted. For example, in ASP.NET, you define a textbox control using this:
<asp:TextBox />
您可以参考它服务器端并分配属性等。不知道这样的功能存在于PHP中。感谢。
And you can reference it server-side and assign properties, etc. Wasn't sure if such capability exists for PHP. Thanks.
推荐答案
没有内置的方法可以完成,但模板系统可以添加类似的功能。我个人使用 Smarty 。这不完全相同,但它是相似的。
There's not a built-in way to do it but template systems can add similar functionality. I personally use Smarty. It's not quite the same but it's similar.
例如,复选框:
For example, check boxes:
{ html_checkboxes name="foo" }
或日期选择器
{ html_select_date time=$some_unix_timestamp }
也很容易扩展它带有插件
Also easy to extend it with plug-ins
这篇关于有没有PHP HTML标签库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!