Home > php教程 > php手册 > body text

PHP创建桌面快捷方式的实例代码

WBOY
Release: 2016-06-13 09:30:43
Original
1279 people have browsed it

复制代码 代码如下:


$shortCut = "[InternetShortcut]
URL=http://www.jb51.net
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
";
Header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=JustFlyHigh.url;");
echo $shortCut; 


首先确保的网站根目录有favicon.ico文件。
修改代码中的网址(URL)和保存的文件名(filename)。

注:保存时的编码不要转成UTF-8,因各种浏览器的差异,有的会造成保存时文件名乱码。
访问此页面时,提示下载.url文件,保存在本地就是一个快捷方式。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!