Rumah  >  Artikel  >  pembangunan bahagian belakang  >  php中网页添加到桌面快捷方式方法_PHP教程

php中网页添加到桌面快捷方式方法_PHP教程

WBOY
WBOYasal
2016-07-13 16:56:391052semak imbas

我们经常会在网站中看到可以直接把网站以快捷方式保存到自己的电脑中,然后只要点击就可以实现进入网了,那么php中怎么把网页添加到桌面快捷方式呢。

功能简单,直接上代码。

 代码如下 复制代码

火星时代IT开发


shortcuts.php 代码

 代码如下 复制代码

$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;

下面还提供一种方法

 代码如下 复制代码

$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;
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/631577.htmlTechArticle我们经常会在网站中看到可以直接把网站以快捷方式保存到自己的电脑中,然后只要点击就可以实现进入网了,那么php中怎么把网页添加到...
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn