如何用代码创建桌面快捷方式呢?
上传到网站,shortcut.php 就会有提示下载一个名为 脚本学堂网站.urll文件,保存在本地就是一个快捷方式!
新建一个PHP文档:名字好记就行如:shortcut.php 
PHP文档中的内容: 
 
复制代码 代码示例:
<?php 
$Shortcut = "[InternetShortcut] 
URL=http://www.jb200.com/ 
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.jb200.com/shortcut.php 就会有提示下载一个名为 脚本之家.url文件,保存在本地就是一个快捷方式! 
下面是asp实现代码:
 
复制代码 代码示例:
<% 
id=int(request("id")) 
if id="" then id="1" 
title=request("title") 
If title="" Then title="脚本之家" 
Shortcut = "[InternetShortcut] " & vbCrLf 
Shortcut = Shortcut & "URL=http://www.jb200.com/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文件一样需要类似的操作。