PHP生成桌面快捷方式
程序员文章站
2024-01-08 22:41:10
...
1,
<a href="shortcut.php?url=www.qijiutech.com&name=奇久">生成左面快捷方式</a>
2 ,
public function shortcut() { $url = $_GET['url']; $filename = urldecode($_GET['name']); //$filename = iconv('GBk','utf-8',$filename);//字符集转换(没有需要转的就不转) if (!$url || !$filename) exit(); $Shortcut = "[InternetShortcut] URL={$url} IDList= [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2"; header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename={$filename}.url;"); echo $Shortcut; exit; }