I want to require/include a file and retrieve its contents into a variable.
test.php
<?php
echo "seconds passed since 01-01-1970 00:00 GMT is ".time();
?>
index.php
<?php
$test=require("test.php");
echo "the content of test.php is:<hr>".$test;
?>
Like file_get_contents()
but than it should still execute the PHP code.
Is this possible?