我正在使用标题重定向但它似乎不适合我,它突然停止之前。我用Google搜索并发现已发送的标头可能是这些原因。我尝试了很多解决方案,但没有一个能为我工作。这是初始代码(它不是完整的代码,因为我的错误一直持续到此代码结束,而不是之后)
<?php ini_set('display_errors',1);error_reporting(E_ALL);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
var price="";
var check=new Array();
</script>
<style>
<!--code for removing spinner-->
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance:textfield;
}
<!--code for removing spinner-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Cart</title>
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/mystyle.css" />
<link rel="stylesheet" href="css/responsive.css" />
<script type="text/javascript" src="engine1/jquery.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
</head>
<body class="loading">
<div class="wrapper">
<?php $pagename="cart";
include("inc/header.php"); ?>
<div class="faq-bg cartbg">
<h1>Your cart</h1>
</div>
<?php
/////////////////////////db is initialized in this class manually
//session_start();
unset($_SESSION['address1-session']);
unset($_SESSION['address1-2-session']);
unset($_SESSION['city1-session']);
unset($_SESSION['state1-session']);
unset($_SESSION['postalcode1-session']);
unset($_SESSION['address2-session']);
unset($_SESSION['address2-2-session']);
unset($_SESSION['city2-session']);
unset($_SESSION['state2-session']);
unset($_SESSION['postalcode2-session']);
unset($_SESSION['puppy_name-session']);
unset($_SESSION['puppydate-session']);
unset($_SESSION['error']);
unset($_SESSION['flag']);
unset($_SESSION['unique_id']);
unset($_SESSION['flagshipping']);
//unset($_SESSION['sess_user']);
unset($_SESSION['quantity']);
unset($_SESSION['bundleplan']);
unset($_SESSION['dogsize']);
unset($_SESSION['extrapuppy']);
unset($_SESSION['toycount']);
这是我正在处理的项目的url,因此您可以看到错误。
答案 0 :(得分:0)
这通常可以通过快速自定义.user.ini更改来解决:
1)创建一个自定义的.user.ini文件(如果还没有)
2)找到如下所示的行:
output_buffering =关
3)将output_buffering行更改为:
output_buffering = On
这应该是使网站重新上线所需的一切。