Fatal error: Uncaught exception 'Zend_Controller_Response_Exception' with message 'Cannot send headers; headers already sent in D:\xampp\htdocs\study\quickstart\application\controllers\IndexController.php, line 35' in D:\xampp\php\PEAR\Zend\Controller\Response\Abstract.php:282 Stack trace: #0 D:\xampp\php\PEAR\Zend\Controller\Response\Abstract.php(300): 1.程序方面的原因:
- Any HTML output, including the DOCTYPE declaration or any HTML tag, including the head of the page
- Extra whitespace before the opening PHP tag of the page, or outside the PHP tags of an include file
- Using print() or echo before calling header() or session_start()
- Using virtual() to include files
- Using the byte-order mark (BOM) at the beginning of a page
把controller层里面的最后的 “?>”去掉就ok了
php.ini方面的原因:
2.修改php.ini的参数配置项
output_buffering off 修改为output_buffering on
session.use_cookies = 1
3.还有在搭建PHP环境的时候php.ini文件的加载路径是在/etc/php.ini, 而php.ini实际路径在/use/local/php/php.ini文件下,
导致Apache加载不到配置文件,所以重启了Apache服务器也没有反应
ZF报错处理
最新推荐文章于 2023-07-24 22:55:01 发布