我正在用 PHP 编写一个页面,但会话代码有问题。这是我的第一行代码:
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php require '/home/fixit/Background/inc.inc'; ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
<link rel="stylesheet" type="text/css" href="css.css" />
</head>
问题是,当我上传它时,我收到了这个错误:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/fixit/public_html/index.php:1) in /home/fixit/public_html/index.php on line 1
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/fixit/public_html/index.php:1) in /home/fixit/public_html/index.php on line 1
我已经在网上提取了页面源代码,发现它在我的会话之前放入了一个小代码,只是一个简单的<br />
我正在使用 Microsoft Expression Web(第一个)对此进行编码,非常感谢任何帮助。谢谢