Home > php教程 > php手册 > ci中 chrome对favicon.ico请求,导致log报错 解决方法

ci中 chrome对favicon.ico请求,导致log报错 解决方法

WBOY
Release: 2016-06-13 11:31:53
Original
1662 people have browsed it

chrome浏览器会自动对favicon.ico进行请求,所以当没有为网站添加 favicon.ico 时会出现404的页面错误
在实际开发过程中,CI框架 打开 ERROR log,
会一直显示ERROR - 2011-10-13 03:43:57 --> 404 Page Not Found --> favicon.ico
解决方法如下
可以修改CI,exception 的show_404方法屏蔽
if ($log_error && $page != 'favicon.ico')

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template