<?php
require_once("dynamic_page.class.php");
try {
$myPage = new DynamicPage("dynamic_page_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>";
/**
* Exception #4
* replaceInPage method calls with inexistent $content parameter in page
*/
$myPage->replaceInPage("name", "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);
?>