设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 手机 数据
当前位置: 首页 > 站长学院 > PHP教程 > 正文

使用php实现下载生成某链接快捷方式的解决方法

发布时间:2022-07-12 11:28 所属栏目:121 来源:互联网
导读:复制代码 代码如下:www.CuoXIn.com ?php $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
  复制代码 代码如下:www.CuoXIn.com
 
  <?php
  $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=链接文字.url;");
  echo $Shortcut;
  ?>
 
  但是,IconFile这个图标没有生效;此外,这个是可以支持中文的,如果不支持中文的话,可以加上一行代码:
  复制代码 代码如下:www.CuoXIn.com
 
  header('Content-Type: text/html; charset=utf-8');
 
  将该php文件放到服务器apache上,然后访问即可生成一个链接的快捷方式。

(编辑:ASP站长网)

    网友评论
    推荐文章
      热点阅读