所以说我有一个文件 page.php
<html>
Hello <?php echo $world;?>
</html>
我想创建一个变量并使用 page.html 为其分配“Hello world”
就像是
$world = 'world';
$mypage = parse_file('page.php');
我想我可以将整个文件用双引号括起来
$mypage="<html>
Hello $world
</html>";
但是双引号解析效率低下。无需编写解析 page.html 的脚本就可以轻松做到这一点吗?