0

如何在 cakephp 网站上设置 iPad/iPhone 书签图标?我使用了正确的文件名 - apple-touch-icon.png - 我尝试将其上传到 /webroot 和 /webroot 上方的目录,但无济于事。我当然尝试搜索谷歌。有没有人成功做到这一点?谢谢!

4

2 回答 2

1

SharkofMirkwood 的回答非常有效。

我补充说:

<link rel="apple-touch-icon" href="../img/apple-touch-icon.png" />

查看/布局/default.ctp

谢谢!

于 2013-07-29T19:23:02.883 回答
1

您可能需要像这样添加多种尺寸:

echo $this->Html->meta(array(
  'rel' => 'apple-touch-icon-precomposed',
  'link' => '/img/apple-touch-icon-57x57-precomposed.png',
));
echo $this->Html->meta(array(
  'rel' => 'apple-touch-icon-precomposed',
  'sizes' => '72x72',
  'link' => '/img/apple-touch-icon-72x72-precomposed.png',
));
echo $this->Html->meta(array(
  'rel' => 'apple-touch-icon-precomposed',
  'sizes' => '114x114',
  'link' => '/img/apple-touch-icon-114x114-precomposed.png',
));
echo $this->Html->meta(array(
  'rel' => 'apple-touch-icon-precomposed',
  'sizes' => '144x144',
  'link' => '/img/apple-touch-icon-144x144-precomposed.png',
));
于 2013-07-29T20:46:54.723 回答