[eluser]Qiao[/eluser]
I found mistakes:
1) $this->load->helper('file'); should be in the function, not out
2) only array should be passed to view, not variable
Code:
function index()
{
$this->load->helper('file');
$ar['content'] = read_file('af.txt');
$this->load->view('af', $ar);
}
That is my first CI script!