/**
* 静态化文件
*/
public function staticFile()
{
/*
$string = $this->output->get_output();
$string = "abcd";
$this->load->helper('file');
write_file('./lianglong_codeigniter.html', $string);
*/
$this->load->helper('file');
$content = $this->load->view('index_lanmu', '', TRUE);
if ( !write_file('./staticfile.php', $content))
{
echo 'Unable to write the file';
}
else
{
echo 'File written!';
}
}
public function viewStaticIndex(){
$this->load->view('staticfile');
}
CI静态化页面
最新推荐文章于 2021-06-23 06:09:37 发布