我有这个已知问题:
这是我的控制器:
<?php
ob_start();
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class AddScore extends CI_Controller
{
//Constructor
function __construct() {
parent::__construct();
$this->load->helper ( 'url' );
$this->load->helper ( 'form' );
}
function AddToDatabase()
{
$userName=$_GET['userName'];
$userID=$_GET['userID'];
$score=$_GET['score'];
$this->load->model('module/ProductsModel');
$this->UserScoresModule->AddUserScore($userID,$userName,$score);
// $data=array('ID' => $_GET['ID'], 'Name' => $_GET['Name']);
// $this->load->view ( 'SupplierAllProductsView',$data);
}
}
在 Stackoverflow 的一篇文章中,有人建议使用ob_start();
,所以我将它添加到我的代码中,但问题仍然存在。
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /hermes/bosweb25a/b500/ipg.spaghetticodestudioc/TDDD27/application/controllers/AddScore.php:1)
Filename: core/Common.php
Line Number: 438
知道我缺少什么吗?