源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

用php或asp创建网页桌面快捷方式的代码

  • 时间:2020-09-23 13:16 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:用php或asp创建网页桌面快捷方式的代码
新建一个PHP文档:名字好记就行如:shortcut.php PHP文档中的内容: 代码
[u]复制代码[/u] 代码如下:
<?php $Shortcut = "[InternetShortcut] URL=http://www.1sucai.cn/ 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 文件 上传到网站,访问地址:如:http://www.1sucai.cn/shortcut.php 就会有提示下载一个名为 编程素材网.url文件,保存在本地就是一个快捷方式! 下面是asp实现代码:
[u]复制代码[/u] 代码如下:
<% id=int(request("id")) if id="" then id="1" title=request("title") If title="" Then title="编程素材网" Shortcut = "[InternetShortcut] " & vbCrLf Shortcut = Shortcut & "URL=http://www.1sucai.cn/article/"&id&".htm?desktop" & vbCrLf Shortcut = Shortcut & "IDList= " & vbCrLf Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}] " & vbCrLf Shortcut = Shortcut & "Prop3=19,2 " & vbCrLf Shortcut = Shortcut & " " & vbCrLf Response.AddHeader "Content-Disposition", "attachment;filename="&title&".url;" Response.ContentType = "application/octet-stream" Response.Write Shortcut %>
需要注意的是,因为可能安全问题导致被锁定 需要如下操作,在"编程素材网.url"--》右键--》属性--》解除锁定 即可访问,这个就像网上下载的chm文件一样需要类似的操作。 [img]http://files.jb51.net/upload/2010-3/20100323143322895.gif[/img]  
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部