用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4345|回复: 8
收起左侧

重新定义方法的调用规则的问题

[复制链接]
发表于 2011-6-20 21:42:38 | 显示全部楼层 |阅读模式
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Cart extends CI_Controller {
public function index()
{
       echo 'dd';
   
}
function _remap($method)
{
    if ($method == 's')
    {
        $this->$method();
    }
    else
    {
        $this->c();
    }
}
function s()
{
  echo 'ddd';
}
function c()
{
echo 'd';
}

}
提示错误了:
Message: Cannot modify header information - headers already sent by
请问这是怎么回事,该如何使用这个函数?
发表于 2011-6-20 21:58:48 | 显示全部楼层
你这个根本不是remap的问题
 楼主| 发表于 2011-6-20 22:06:37 | 显示全部楼层
jeongee 发表于 2011-6-20 21:58
你这个根本不是remap的问题

不懂,指点迷津哈
发表于 2011-6-20 23:06:57 | 显示全部楼层
可能是存在bom.使用edplut另存为去掉BOM
 楼主| 发表于 2011-6-21 18:06:02 | 显示全部楼层
avinmo 发表于 2011-6-20 23:06
可能是存在bom.使用edplut另存为去掉BOM

不行哦,求解答
发表于 2011-7-13 21:38:18 | 显示全部楼层
你用editplus去bom了?
 楼主| 发表于 2011-7-16 11:33:25 | 显示全部楼层
avinmo 发表于 2011-7-13 21:38
你用editplus去bom了?

就没有bom这么一项...
发表于 2011-7-18 17:33:59 | 显示全部楼层
我想截图给你。。可是我没有权限上传图片。。。
发表于 2011-7-18 17:34:26 | 显示全部楼层
如果还解决不了。 可以加我QQ。 86736139

本版积分规则