用php\asp创建 网页桌面快捷方式
新建一个PHP文档:名字好记就行如:shortcut.php
PHP文档中的内容:
代码
1 <?php
2 $Shortcut = "[InternetShortcut]
3 URL=http://www.zhangchu.net/
4 IDList=
5 [{000214A0-0000-0000-C000-000000000046}]
6 Prop3=19,2
7 ";
8 Header("Content-type: application/octet-stream");
9 header("Content-Disposition: attachment; filename=张楚网站.url;");
10 echo $Shortcut;
11 ?>
2 $Shortcut = "[InternetShortcut]
3 URL=http://www.zhangchu.net/
4 IDList=
5 [{000214A0-0000-0000-C000-000000000046}]
6 Prop3=19,2
7 ";
8 Header("Content-type: application/octet-stream");
9 header("Content-Disposition: attachment; filename=张楚网站.url;");
10 echo $Shortcut;
11 ?>
asp 代码
1 <%
2 id=request("id")
3 gname=request("gname")
4 If gname="" Then gname="4usky小游戏"
5 Shortcut = "[InternetShortcut] " & vbCrLf
6 Shortcut = Shortcut & "URL=http://www.4usky.com/swf/"&id&".htm?desktop" & vbCrLf
7 Shortcut = Shortcut & "IDList= " & vbCrLf
8 Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}] " & vbCrLf
9 Shortcut = Shortcut & "Prop3=19,2 " & vbCrLf
10 Shortcut = Shortcut & " " & vbCrLf
11 Response.AddHeader "Content-Disposition", "attachment;filename="&gname&".url;"
12 Response.ContentType = "application/octet-stream"
13 Response.Write Shortcut
14 %>
2 id=request("id")
3 gname=request("gname")
4 If gname="" Then gname="4usky小游戏"
5 Shortcut = "[InternetShortcut] " & vbCrLf
6 Shortcut = Shortcut & "URL=http://www.4usky.com/swf/"&id&".htm?desktop" & vbCrLf
7 Shortcut = Shortcut & "IDList= " & vbCrLf
8 Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}] " & vbCrLf
9 Shortcut = Shortcut & "Prop3=19,2 " & vbCrLf
10 Shortcut = Shortcut & " " & vbCrLf
11 Response.AddHeader "Content-Disposition", "attachment;filename="&gname&".url;"
12 Response.ContentType = "application/octet-stream"
13 Response.Write Shortcut
14 %>
要想出现图标请先确保网站根目录中有 favicon.ico 文件
上传到网站,访问地址:如:http://www.zhangchu.net/shortcut.php 就会有提示下载一个名为 张楚网站.urll文件,保存在本地就是一个快捷方式!