0
你好,讓我解釋一下我的問題。我使用PHP的時刻,我只是玩弄現在有點我想知道,如果我有例如文件:我可以在另一個包含文件中使用包含文件的變量嗎?
//This is file1.php
<?php
$text = "Hello";
?>
,包括它在文件2,也包括文件3:
//This is file2.php
<?php
include 'file1.php';
include 'file3.php';
?>
現在我的問題是,我可以使用$文本文件3,像這樣?:
//This is file3.php
<?php
echo $text;
?>
謝謝您的回覆!
你是否甚至費心去嘗試它,這不是一個巨大的測試努力,讓它一去 – RiggsFolly