我正在将我的网站转移到网上,但是当我编辑我的表数据时,我遇到了这样的错误,
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/shintiad/public_html/sociotraveler/application/views/template/index.php:20)
Filename: libraries/Session.php
Line Number: 688
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/shintiad/public_html/sociotraveler/application/views/template/index.php:20)
Filename: helpers/url_helper.php
Line Number: 542
我的模板/索引.php代码
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<?php $this->load->view('template/partial/meta');?>
<!-- Meta -->
</head>
<body>
<!-- Header -->
<?php $this->load->view('template/partial/sidebar');?>
<!-- Header -->
<!-- Dynamic Content -->
<div class="content">
<?php $this->load->view("{$page_info->content}");?>
</div>
<!-- Dynamic Content -->
<!-- Footer -->
<?php $this->load->view('template/partial/footer');?>
<!-- Footer -->
</body>
</html>
当我在我的本地主机上运行它时,一切都很好。请帮忙,谢谢...*我之前检查过空格
请检查所有PHP文件并删除<?php
标记之前的空格。如果有空格或换行符,则会启动 http 请求的正文,并且无法向 http 请求添加新标头。