Home  >  Article  >  Backend Development  >  Example code for creating desktop shortcut with PHP_PHP tutorial

Example code for creating desktop shortcut with PHP_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:25:021233browse

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/...
Statement:
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