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

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

WBOY
WBOYOriginal
2016-06-13 11:31:531649browse

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')

Statement:
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