【发布时间】:2014-04-15 15:58:17
【问题描述】:
我有这个:
ob_start(); ?> <div class="" id="loading"> <?php echo file_get_contents($page["texto"]) ?> </div> <?php $content = ob_get_clean();
但我想将该模板 html 放在一个单独的文件中,就像:
$content = file_get_contents('cms/template.php');
现在这行不通了,因为它里面有 php 标签,并且在检索字符串时它得到了
我怎样才能在不使用肮脏的黑客的情况下实现这一点:
$pre = file_get_contents('part1');
$var = file_get_contents($page["texto"]);
$post = file_get_contents('part2');
然后将它们全部添加...
【问题讨论】: