我試圖使用form_helper.php一個輔助類笨2.2.0 和下面是它給了錯誤,當我嘗試這樣做:笨2.2.0 form_helper給人錯誤
控制器文件
$this->load->helper('form');
視圖文件
<?php
$attributes = array('class' => 'form-horizontal', 'id' => 'admin-form');
echo form_open($this, $attributes);
?>
錯誤:
A PHP Error was encounteredSeverity: Warning
Message: strpos() expects parameter 1 to be string, object given
Filename: helpers/form_helper.php
Line Number: 53
A PHP Error was encounteredSeverity: 4096
Message: Object of class CI_Loader could not be converted to string
Filename: helpers/form_helper.php
Line Number: 61
Although it does print the tag.
What I could be doing wrong here ?
form_open($ this,$ attributes)是我想的問題。第一個參數應該是您要鏈接到的控制器方法。 – Craig 2014-12-04 12:57:00