CI静态化页面

来源:互联网 发布:无法启用网络发现 编辑:程序博客网 时间:2024/06/16 06:46
/** * 静态化文件 */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');}

0 0
原创粉丝点击