【发布时间】:2016-11-24 10:56:29
【问题描述】:
我正在尝试修改输出缓冲区的内容。 我得到了这样的东西:
if($this->page == 'login')
{
$output = ob_get_contents(); // $output is index.html
// have no idea how to modify `$output`
}
还有我的index.html:
<html>
<head></head>
</body>
if($usr ==null) include 'login.php';
else include main.php; //`main.php` with header bar and footer bar
// this's where i want to clean and insert my login form (login.php)
</body>
</html>
和login.php:
<?php
<form>
.....
</form>
?>
我有$output 但我想清理所有并将login.php 的来源插入正文中,以便每个人都可以看到我的登录表单(网站样式有css)。我在谷歌上搜索过,只知道如何获取内容、清理和刷新。但我看不到如何修改缓冲区内容。有办法修改吗?
【问题讨论】:
标签: php html css output php-5.5