Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 20466 программистов и 981 робот. Сейчас ищут 776 программистов ...

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

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware