Example code for creating desktop shortcut with PHP_PHP tutorial

WBOY
Release: 2016-07-13 10:25:02
Original
1233 people have browsed it

Copy code The code is as follows:

$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;

First make sure that the root directory of the website has favicon .ico file.
Modify the website address (URL) and saved file name (filename) in the code.

Note: Do not convert the encoding to UTF-8 when saving. Due to differences in various browsers, some may cause the file name to be garbled when saving.
When visiting this page, you are prompted to download the .url file. Saving it locally is a shortcut.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/825239.htmlTechArticleCopy the code The code is as follows: $shortCut = "[InternetShortcut] URL=http://www.jb51.net IDList = [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2 "; Header("Content-type: application/...
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 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!