仿开心网的“设为桌面图标”,让你的网站的快捷方式保存到用户的桌面上

疯子MM博客上看到的教程,结果那个MJJ缺少代码,没有实现。

下面的是从DZ搜索的方法,已经实现。

<?php
$Shortcut = “[InternetShortcut]
URL=http://www.xiongwei.org/
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
“;
Header(“Content-type: application/octet-stream”);
header(“Content-Disposition: attachment; filename=熊伟是帅哥.url;”);
echo $Shortcut;
?>

首先确保的网站根目录有/favicon.ico文件。

修改代码中的网址和保存的文件名

然后代码另存为shortcut.php,上传至FTP

访问此页面时,提示下载.url文件,保存在本地就是一个快捷方式。

演示:http://www.xiongwei.org/shortcut.php

  1. 我想知道 这个跟我简单的做一个桌面快捷方式有什么区别

      • Jeremy
      • 二月 24th, 2010

      这个主要是可以让用户下载~!

  2. 这个感觉更装A,应该是这样吧。。。

  3. 明白了 zhuangbility专用

  4. :smile:

    待会俺搞个自己用去。

  1. 二月 24th, 2010
:xia: :wink: :twisted: :tushe: :smile: :sad: :piezui: :oops: :mrgreen: :kiss: :idea: :evil: :cry: :arrow: :Titter: :Curse: :?: :00: :-| :-o :-D 8)

:xia: :wink: :twisted: :tushe: :smile: :sad: :piezui: :oops: :mrgreen: :kiss: :idea: :evil: :cry: :arrow: :Titter: :Curse: :?: :00: :-| :-o :-D 8)