Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17187 программистов и 1835 роботов. Сейчас ищут 1567 программистов ...
Body
Вернуться к: HTML_Page2
Body
Body – Adding content
After creating the page and setting headers, you want to add actual content to the page. The method in charge is addBodyContent().
By default, if content already exists, the new content is appended. If you wish to overwrite whatever is in the body, use setBody(); unsetBody() completely empties the body without inserting new content. You can also use prependBodyContent() to prepend content to whatever is currently in the array of body elements.
The following constants are defined to be passed as the flag attribute: HTML_PAGE2_APPEND, HTML_PAGE2_PREPEND and HTML_PAGE2_REPLACE. Their usage should be quite clear from their names.
<?php
$page->addBodyContent('<h1>Hello!</h1>');
$page->addBodyContent('<p>This is a paragraph.</p>');
?>
Вернуться к: HTML_Page2