<?php
require_once("dynamic_page.class.php");
try {
/**
* Exception #2
* Constructor method calls with inexistent file in path
*/
$myPage = new DynamicPage("test.html");
echo "Before apply DynamicPage, comment tag <--user --> is hidden:</br>";
$myPage->showPage();
echo "After apply DynamicPage, comment tag <--user --> was replaced to new content:</br>";
$myPage->replaceInPage("user", "Marcos", true); // input 'true' in the 3rd parameter to republishing the tag
$myPage->replaceInPage("user", " Bezerra"); // or omit that for not.
$myPage->showPage();
} catch(DynamicPageException $dpe) {
echo $dpe;
}
unset($myPage);
?>