本文整理匯總了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;