添加到网站的收藏夹

可能的复制品:
HTML 标题图片

有人能告诉我如何使图标出现在 PHP 浏览器标签?

当我的网站被访问时,我希望我的图标出现在选项卡上。

340316 次浏览

Simply put a file named favicon.ico in the webroot.

If you want to know more, please start reading:

  1. This is not done in PHP. It's part of the <head> tags in a HTML page.
  2. That icon is called a favicon. According to Wikipedia:

    A favicon (short for favorites icon), also known as a shortcut icon, website icon, URL icon, or bookmark icon is a 16×16 or 32×32 pixel square icon associated with a particular website or webpage.

  3. Adding it is easy. Just add an .ico image file that is either 16x16 pixels or 32x32 pixels. Then, in the web pages, add <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> to the <head> element.
  4. You can easily generate favicons here.