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

保存到桌面、设为桌面的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点击下载下有可能会知码!

参考实例:天气预报网http://tqybw.net