/ Published in: PHP
This was posted on the PHP website, I use it quite often. You may get a warning as it is an "unsafe" include (include($var)), but it's a risk that needs to be taken.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Fetch the files contents -- parsed by PHP -- as if it were included * * @param string $file * @return string */ function get_include_contents($file) { include($file); return $contents; }