We often see on the website that we can directly Save the website to our computer in a shortcut, and then click it to access the network, in php, how does one add a webpage to the desktop shortcut.
Simple functions and direct code.
| The Code is as follows: |
Copy code |
<A href = 'shortcuts. php'> IT development in the fire age </a> |
Shortcuts. php code
| The Code is as follows: |
Copy code |
$ Shortcut =" [InternetShortcut] URL = http://www.bKjia. c0m IDList = IconFile = http://www.bKjia. c0m/favicon. ico Prop3 = 19,2 "; Header ("Content-Type: application/octet-stream "); Header ("Content-Disposition: attachment; filename = 111cn. url "); Echo $ Shortcut; |
The following provides a method
| The Code is as follows: |
Copy code |
<? Php $ Shortcut = "[InternetShortcut] URL = http://www.bKjia. c0m/ IDList = [{000214A0-0000-0000-C000-000000000046}] Prop3 = 19,2 "; Header ("Content-type: application/octet-stream "); Header ("Content-Disposition: attachment; filename = 11cn. url ;"); Echo $ Shortcut; ?> |