求教,我的redirect为什么报错
代码如下,一个controller<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Admin extends CI_Controller{
function __construct(){
parent::__construct();
$this->load->database();
$this->load->helper('url');
$this->load->library('pagination');
date_default_timezone_set('Asia/Shanghai');
}
function index(){
redirect('login/');
}
我直接访问http://www.example.com/ci/admin
报错,信息为。
A PHP Error was encounteredSeverity: WarningMessage: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\ci\application\controllers\admin.php:1)Filename: helpers/url_helper.phpLine Number: 546我想知道,我这些地方哪里有输出呢?
错误提示,不能修改头消息-头消息已经被发送了。 D:\AppServ\www\ci\application\controllers\admin.php 文件有 BOM,
什么是BOM请搜索论坛。 BOM真是个讨厌的东西 修改编码,成功了。谢谢各位
页:
[1]