Home > Backend Development > PHP Tutorial > Solution to download and generate a link shortcut using PHP_PHP Tutorial

Solution to download and generate a link shortcut using PHP_PHP Tutorial

WBOY
Release: 2016-07-21 15:10:41
Original
958 people have browsed it

Copy code The code is as follows:

$Shortcut = "[InternetShortcut]
URL=http: //www.your_url.com/
IconFile=http://www.your_icon.com/
IconIndex=1
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
";
header("Content-type: application/octet-stream"); ​​
header("Content-Disposition: attachment; filename=Link text.url; ");
echo $Shortcut;
?>

However, the IconFile icon does not take effect; in addition, this can support Chinese. If it does not support Chinese, you can add Previous line of code:
Copy code The code is as follows:

header('Content-Type: text/html; charset=utf -8');

Put the php file on the server apache, and then access it to generate a link shortcut.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327020.htmlTechArticleCopy the code as follows: ?php $Shortcut = "[InternetShortcut] URL=http://www.your_url. com/ IconFile=http://www.your_icon.com/ IconIndex=1 IDList= [{000214A0-0000-0000-C000-000000...
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