帮手

自动加载你的助手功能。如果你在项目中使用很多时间

$autoload['helper'] = array('url', 'form');

在视图中使用表单助手

<?php echo form_open('Public/Login/loginAuth'); ?>

<?php
       echo "<div class='row'>";
       echo "<label for='inputEmail' class='col-lg-2 control-label col-lg-offset-2 col-md-2 control-label col-md-offset-2 col-sm-2 control-label col-sm-offset-2'>Enter Email</label>";
       $email = array(
          "name"=>"email",
          "placeholder"=>"Email",
          "class"=>"form-control"
          );

     echo "<div class='col-lg-6 col-md-6 col-sm-6'>";
     echo form_error('email');
    echo form_input($email)."<br/>";
  echo "</div>";
echo "</div>";

echo "<div class='row'>";
    echo "<label for='inputPassword' class='col-lg-2 control-label col-lg-offset-2 col-md-2 control-label col-md-offset-2 col-sm-2 control-label col-sm-offset-2'>Enter Password</label>";
  $password = array(
    "name"=>"password",
    "placeholder"=>"Password",
      "class"=>"form-control"
    );

  echo "<div class='col-lg-6 col-md-6 col-sm-6'>";
    echo form_error('password');
    echo form_password($password)."<br/>";
  echo "</div>";
echo "</div>";

echo "<div class='row'>";
  
  $submit = array(
    "name"=>"submit",
    "value"=>"Submit",
    "class"=>"btn btn-primary col-lg-offset-9 col-md-offset-9 col-sm-offset-9 col-xs-offset-9"
    );
  echo form_submit($submit)."<br/>";

echo "</div>";

?>