您可以在页面中的任何位置打开 PHP 文件吗?


Can you open a PHP file anywhere in the page?

这个问题让我感到困惑。您可以从.php文件中的任何位置打开 php 文件吗?前任:

// index.php
<?php 
include('functions.php');
// ...
?>
<body>
// ...
</body>
<footer>
// This is what I'm trying to do
<?php include_once('blog.php'); ?>
</footer>

文档说

"PHP 脚本可以放置在文档中的任何位置"

因此,由于include('functions.php')是一个PHP脚本,它可以放在文档中的任何位置。所以是的,我们可以在页面中的任何位置打开 PHP 文件。