你能在页面的任何地方打开PHP文件吗?

时间:2013-09-29 13:55:53

标签: php

这个问题令我感到困惑。你能从.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>

1 个答案:

答案 0 :(得分:0)

文档说

  

'PHP脚本可以放在文档'

中的任何位置

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