在网站上设置“加入收藏、设为首页”等按钮是一般网站都会干的事儿,但是有的网站还有“放到桌面”这样的功能设置。
下面即生成快捷方式并下载到桌面的php实现代码,摘录修改于网络,仅作参考
php实现代码:
asp实现代码:
Shortcut = \"[DEFAULT]\" & vbCrLf
Shortcut = Shortcut & \"BASEURL=http://www.phpstudy.net/?desktop\" & vbCrLf
Shortcut = Shortcut & \"[{000214A0-0000-0000-C000-000000000046}]\" & vbCrLf
Shortcut = Shortcut & \"Prop3=19,2\" & vbCrLf
Shortcut = Shortcut & \"[InternetShortcut]\" & vbCrLf
Shortcut = Shortcut & \"URL=http://www.phpstudy.net/?desktop\" & vbCrLf
Shortcut = Shortcut & \"IDList=[{000214A0-0000-0000-C000-000000000046}]\" & vbCrLf
Shortcut = Shortcut & \"IconFile=http://www.phpstudy.net/favicon.ico\" & vbCrLf
Shortcut = Shortcut & \"IconIndex=\" & id & vbCrLf
Shortcut = Shortcut & \"HotKey=0\" & vbCrLf
Shortcut = Shortcut & \"Prop3=19,2\" & vbCrLf
Response.AddHeader \"Content-Dispositon\", \"attachment;filename=\" & title & \".url\";
Response.ContetType = \"application/octet-steam\"
Response.Write Shortcut
%>
本文地址:https://www.stayed.cn/item/18174
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我