幫手
自動載入你的助手功能。如果你在專案中使用很多時間
placeholderCopy$autoload['helper'] = array('url', 'form');
在檢視中使用表單助手
placeholderCopy<?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>";
?>