douyangquan2474 2015-03-06 17:17
浏览 46
已采纳

表单元素的html表单元素与php函数

I am using an open source PHP ERP Application. I found something new over there. The application uses different methods for form elements ex : Instead of below

<input id="employee_name" class="textfield employee_name" type="text" data-toggle="tooltip" title="" placeholder="" size="20" maxlength="256" value="Eric Stock" name="employee_name[]">

I see a php function (method actually) like

<?php $f->text_field_d() ?>

The application is quite big and I guess would have 300/400 forms and there are single forms which contains 100 + such input/select/check box element.

So, my question is

  1. Is this standard in PHP to use some functions/instead of actual HTML
  2. Does it impact the performance ; I plan to do some customization so should I use plain text or use these kind of functions
  • 写回答

1条回答 默认 最新

  • duanaoreng9355 2015-03-06 17:23
    关注

    It's not necessarily standard. It's how much do want to re-write the same code over again. The parameter would just be passed to the php function, and the function will do the rest. It doesn't impact performance.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题