保存到桌面、设为桌面的PHP代码

新建一个文件 shortcut.php 代码如下:
<?php
$Shortcut = "[InternetShortcut] URL='http://tqybw.net' IDList=IconIndex=43 IconFile=/favicon.ico HotKey=1626 [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2";
 Header("Content-type: application/octet-stream"); 
header("Content-Disposition: attachment; filename=天气预报网.url");
 echo $Shortcut;
?> 
注意:编码最好为GBK,不然中文文件名在IE点击下载下有可能会知码!
posted on 2012-07-26 09:20  千里码  阅读(1246)  评论(0编辑  收藏  举报