Forum Moderators: coopster
<?php
$url = $_SERVER['PHP_SELF'];
list($host, $dom, $text, $page) = split('[/]', $url);
$document = implode('', file("../$page"));
?>
The problem actually is that becuse it strips it as a string the content is not parsable again so anything that used to print a date() query for example doesnt work...
Is there a way to make the page content parsable again after it has been ripped as a string or is there an easier way to do this.
Script has to be in PHP only and I have zero budget so I need to make this work...
Thanks in advance...
Moreover if you've got yourself a string that is with vars you can or use exec() [php.net] or better str_replace() [php.net].
Hope this gives you a push in right direction
Michal Cibor
To parse a string as a php use eval() [php.net] function:
$string = '$a = 3;
$b = $a * $a;
echo \'<br><br>This is variable $a: \'. $a.\'<br>And this is variable $a^2: \'. $b;';
echo $string;
eval($string);
Hope this helps
Michal Cibor