Home  >  Article  >  Backend Development  >  Example of php output download as desktop icon

Example of php output download as desktop icon

WBOY
WBOYOriginal
2016-07-25 08:52:441726browse
  1. $Shortcut = "[InternetShortcut]
  2. URL=http://www.leduz.com/#shortcut
  3. IconFile=http://www.leduz.com/faviconbig.ico
  4. IconIndex =1
  5. IDList=
  6. [{000214A0-0000-0000-C000-000000000046}]
  7. Prop3=19,2
  8. ";
  9. Header("Content-type: application/octet-stream"); ​​
  10. header("Content- Disposition: attachment; filename=小 Judeng Classified Information Network.url;");
  11. echo $Shortcut;
  12. ?>
Copy the code

and save it as a php file. Click the link to download it to the desktop icon

Note that different systems may have problems with the ico icon not being displayed. Please try the following code:

  1. [DEFAULT]
  2. BASEURL=http://www.leduz.com/
  3. [InternetShortcut]
  4. URL=http://www.leduz.com/#shortcut
  5. Modified=70BF4B88E372CC0124
  6. IconFile=http: //www.leduz.com/faviconbig.ico
  7. IconIndex=1
Copy code


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