本节内容:
php生成下载链接的快捷方式
点击一个页面中的某个按钮或链接,生成某链接的快捷方式同时下载到本地。
例子:
 
复制代码 代码示例:
<?php  
$Shortcut = "[InternetShortcut]  
URL=http://www.jb200.com/  
IconFile=http://www.jb200.com/  
IconIndex=1  
IDList=  
[{000214A0-0000-0000-C000-000000000046}]  
Prop3=19,2  
";  
header("Content-type: application/octet-stream");  
header("Content-Disposition: attachment; filename=链接文字.url;");  
echo $Shortcut;  
?> 
但是,IconFile这个图标没有生效;此外,这个是可以支持中文的,如果不支持中文的话,可以加上代码:
 
复制代码 代码示例:
header('Content-Type: text/html; charset=utf-8'); 
将该php文件放到服务器上,然后访问即可生成一个链接的快捷方式。