Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display a PNG favicon in CakePHP

Tags:

php

cakephp

How do I show a PNG favicon in CakePHP? I'm currently using $this->Html->meta('icon') but it looks for .ico in the root. How do I change it so that it looks for .png?

like image 322
Cameron Avatar asked Oct 09 '11 11:10

Cameron


Video Answer


2 Answers

$this->Html->meta('icon', $this->Html->url('/favicon.png'));
like image 71
Dzoki Avatar answered Sep 19 '22 06:09

Dzoki


This would be better to use:

<?php
echo $this->Html->meta('favicon.ico','img/favicon.ico',array('type' => 'icon'));
?>
like image 37
Suman Kalyan Avatar answered Sep 20 '22 06:09

Suman Kalyan