<?php
// this is test.php
$variable1 = "test1";
$variable2 = "test2";
?>
是否可以在&#34; index.php&#34;中打印这些变量名称的列表。 ?
<?php
// this is index.php
$variable3 = "test3";
$variable4 = "test4";
include("test.php");
/* Here print names of variables from "test.php" somehow...?
(Only "$variable1", "$variable2")
*/
?>
答案 0 :(得分:0)
试试index.php
<?php
$variable3 = "test3";
$variable4 = "test4";
include("test.php");
echo $variable1;
echo $variable2;
?>