xyst0524 发表于 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
请问这是怎么回事,该如何使用这个函数?

jeongee 发表于 2011-6-20 21:58:48

你这个根本不是remap的问题

xyst0524 发表于 2011-6-20 22:06:37

jeongee 发表于 2011-6-20 21:58 static/image/common/back.gif
你这个根本不是remap的问题

不懂,指点迷津哈

avinmo 发表于 2011-6-20 23:06:57

可能是存在bom.使用edplut另存为去掉BOM

xyst0524 发表于 2011-6-21 18:06:02

avinmo 发表于 2011-6-20 23:06 static/image/common/back.gif
可能是存在bom.使用edplut另存为去掉BOM

不行哦,求解答

avinmo 发表于 2011-7-13 21:38:18

你用editplus去bom了?

xyst0524 发表于 2011-7-16 11:33:25

avinmo 发表于 2011-7-13 21:38 static/image/common/back.gif
你用editplus去bom了?

就没有bom这么一项...

avinmo 发表于 2011-7-18 17:33:59

我想截图给你。。可是我没有权限上传图片。。。

avinmo 发表于 2011-7-18 17:34:26

如果还解决不了。 可以加我QQ。 86736139
页: [1]
查看完整版本: 重新定义方法的调用规则的问题