Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php codeigniter Rest_控制器输出格式错误_Php_Codeigniter - Fatal编程技术网

Php codeigniter Rest_控制器输出格式错误

Php codeigniter Rest_控制器输出格式错误,php,codeigniter,Php,Codeigniter,无论选择何种输出格式,一些“\r\r\r”都会出现在输出的开头。对于XML格式,它会生成错误的格式错误,因为我已经找到了原因。加载库时,它来自CI_控制器:必须避免在所有库结束时关闭PHP,包括: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Module_xxx extends Module_yyy { - } /* End of file module

无论选择何种输出格式,一些“\r\r\r”都会出现在输出的开头。对于XML格式,它会生成错误的格式错误,因为我已经找到了原因。加载库时,它来自CI_控制器:必须避免在所有库结束时关闭PHP,包括:

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    class Module_xxx extends Module_yyy {

-
    }
/* End of file module_xxx.php */
/* Location: ./application/librairies/module_xx/module_client.php */

那么你回答了你自己的问题?如果是,请将答案放在下面的答案框中,并将其标记为已回答。CodeIgniter手册中指出了该问题:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    class Module_xxx extends Module_yyy {

-
    }
/* End of file module_xxx.php */
/* Location: ./application/librairies/module_xx/module_client.php */