使用from_open()之前需要装载本辅助函数:
$this->load->helper('form');


php===》 echo form_open('email/send')    
等同于   
html===》 <form method="post" action="http://example.com/index.php/email/send" />


php===》$attributes = array('class' => 'email', 'id' => 'myform');
echo form_open('email/send', $attributes);
等同于 
html===》<form method="post" action="http://example.com/index.php/email/send" class="email" />


增加隐藏域:
php===》$hidden = array('username' => 'Joe', 'member_id' => '234');
echo form_open('email/send', '', $hidden);
等同于 
html===》<form method="post" action="http://example.com/index.php/email/send">
<input type="hidden" name="username" value="Joe" />
<input type="hidden" name="member_id" value="234" />

相关文章:

  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-04
  • 2021-08-29
  • 2021-12-19
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-01-06
相关资源
相似解决方案