01-18-2008, 07:59 PM
|
#8 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
PHP Code:
public function html_grab($html) { file_exists($html . '.html') or die('The HTML Document currently does not exsist'); ob_start(); include $site_path . "/html/" . $html . ".html"; return ob_get_clean(); }
I've tidied it up abit:
cannot be in the function parameters, plus if it did work it would be pointless.
PHP Code:
$tpl_content_parse =ob_get_clean();
return $tpl_content_parse;
removed this as there is no need for the temp variable, just return the HTML from ob_get_clean();
to use:
PHP Code:
echo html_grab('testfileorwatever');
unless you change 'return' for echo but u proably already know that, bah i need coffee
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 01-18-2008 at 08:07 PM.
Reason: *sigh* oh how i wish i could spell
|
|
|
|