本文整理汇总了PHP中HTML_Page2::getBodyContent方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Page2::getBodyContent方法的具体用法?PHP HTML_Page2::getBodyContent怎么用?PHP HTML_Page2::getBodyContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_Page2
的用法示例。
在下文中一共展示了HTML_Page2::getBodyContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP Version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997 - 2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Klaus Guenther <klaus@capitalfocus.org> |
// +----------------------------------------------------------------------+
//
// $Id$
require_once 'HTML/Page2.php';
// With no initial settings, the following defaults are set:
// -> lineends = unix (\12)
// -> doctype = XHTML 1.0 Transitional
// (if set to "none", doctype and language are not set)
// -> language = en
// -> cache = false
$page = new HTML_Page2();
// Page title defaults to "New XHTML 1.0 Transitional Compliant Page"
$page->addBodyContent('<h1>Headline</h1>');
$page->addBodyContent('<p>Copyright 2003 The PHP Group</p>');
$bodyContent = $page->getBodyContent();
echo $bodyContent;