PHP Create desktop Shortcut instance, php shortcut instance
To create desktop shortcuts with PHP we need to use Header,internetshortcut and some code that I can't read.
method: Create a new PHP file, and then throw the following code in, save for example shortcut.php, put on the site and directory, the code is as follows:
$shortCut = "[internetshortcut] url=http://www.baidu.com idlist= [{ 000214a0-0000-0000-c000-000000000046}] prop3=19,2 "; Header ("Content-type:application/octet-stream"); Header ("Content-disposition:attachment; Filename=baidu.url; " ); Echo $shortCut
Use PHP to write a download page to the desktop shortcut code site after the display of the following questions, ask how to solve
You have to write a separate page to create the shortcut, I guess you have the content on the page before this, so hold a wrong
a.php
----------------------------------
$url = $_get[' url '];
$filename = UrlDecode ($_get[' name ');
$filename = Iconv (' utf-8 ', ' GBk ', $filename);//Character Set conversion
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;
Make a hyperlink at the time of generation
Shortcuts </a>
How JavaScript creates desktop shortcuts
Common on the web is called
Wshshell.createshortcut but only IE supports ActiveXObject objects
So you can only run backstage and return a shortcut to the implementation.
Similar to downloading files
I got you an example of PHP.
http://www.bkjia.com/PHPjc/831620.html www.bkjia.com true http://www.bkjia.com/PHPjc/831620.html techarticle PHP Create desktop Shortcut instances, PHP shortcut instances to use PHP to create desktop shortcuts we need to rely on header,internetshortcut and some of the code I do not understand. Method: New ...