我正在使用Smarty和我的php代码,我喜欢缓存一些网站页面,所以我使用了以下代码:ob_start(); // start the output buffer= fopen($cachefile, 'w'); // open the cache file for writing
fwrite($fp, ob_get_contents()); // save文件的末尾打印ob_get_contents
phpfile_put_contents('someName.html', ob_get_contents());
// end buffering and displaying我要做的是将html的名称从"someName".html更改为PHP。PHP页面是一个动态PHP页面,它将根据用户的需要通过html表单显示一些结果。例如:用户在输入框中输入2,创建的html页面为2.html,而不是some