所以这是网站:
如果你转到网址并突出显示上页,你会看到:
Warning: session_start(): Cannot send session cache limiter -
headers already sent (output started at
/home/mirmehrk/public_html/canz.co/index.php:1) in
/home/mirmehrk/public_html/canz.co/include/fgcontactform.php on line
63
任何人都可以帮我删除此错误吗?
正如你所看到的,在我打开php之前没有什么,所以问题出在哪里? 也许第二个PHP是问题?不是吗?
索引文件:
<?PHP
/*
Contact Form from HTML Form Guide
This program is free software published under the
terms of the GNU Lesser General Public License.
See this page for more info:
http://www.html-form-guide.com/contact-form/simple-modal-popup-contact-form.html
*/
//1. First, include the file popup-contactform.php
require_once('popup-contactform.php');
//2. link to the style file contact.css
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<title>Canz.co</title>
<link rel="STYLESHEET" type="text/css" href="popup-contact.css">
</head>
<body onload="javascript:fg_hideform('fg_formContainer','fg_backgroundpopup');">
<div id="canvas" align="center" style="z-index:0;position:relative"></div>
<div id="lang">
<span>
<a href="http://canz.co">
<input type="button" id="btnEN" value="EN"/>
</a>
</span>
<span>
<a href="http://canz.co/fa">
<input type="button" id="btnFA" value="فا"/>
</a>
</span>
</div>
<a href='javascript:fg_popup_form("fg_formContainer","fg_form_InnerContainer","fg_backgroundpopup");'>
<div style="font-size:18px;color:#9db1b2;text-align:center;margin-top:16px;">CONTACT US</div>
</a>
<div style="font-size:12px;color:#0a7a6b;text-align:center;margin-top:9px;">Recommended resolution: 1280px X 720px</div>
<div style="font-size:14px;color:#9db1b2;text-align:center;">Copyright 2014, All rights reserved</div>
<script src="js/jquery.min.js"></script>
<script src="js/raphael-min.js"></script>
<script src="js/our_script.js"></script>
<script>
var bodhei = window.innerHeight;
var bodwid = window.innerWidth;
$('body').innerHeight(bodhei);
$('body').innerWidth(bodwid);
</script>
<?PHP
//3. php include contactform-code.php at the end of the page
require_once('contactform-code.php');
?>
</body>
</html>
答案 0 :(得分:0)
这意味着,在<?php
之前已有输出。即使是空格也会被视为输出。
答案 1 :(得分:0)
在调用session_start之前,请检查您是否发送了任何数据。只需将session_start作为PHP文件的第一行。
<?php
session_start();
并确保之前绝对没有空格