zoukankan      html  css  js  c++  java
  • 用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 ?>

    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 %>

    要想出现图标请先确保网站根目录中有 favicon.ico 文件

    上传到网站,访问地址:如:http://www.zhangchu.net/shortcut.php 就会有提示下载一个名为 张楚网站.urll文件,保存在本地就是一个快捷方式!

    asp演示 http://www.4usky.com/shortcut/

  • 相关阅读:
    C语言 · 递归求二项式系数值
    C语言 · 错误票据
    C语言 · 色盲的民主
    C语言 · 分苹果
    C语言 · Quadratic Equation
    C语言 · 企业奖金发放
    C语言 · 最长单词
    C语言 · 高精度加法
    C语言 · 判断回文
    C语言 · 简单计算器
  • 原文地址:https://www.cnblogs.com/smallmuda/p/1691952.html
Copyright © 2011-2022 走看看