通常我们看到大型网站都会用到保存网站快捷链接到桌面的功能,这种功能其实需要程序来完成,代码也很简单。

这里为大家分享一段帝国CMS专用的保持快接链接到桌面的代码:

<?php

require(
“e/class/connect.php”);

$add=$_GET;

$id=$add[
“id”];

$gname=$add[
“gname”];


if ($gname==
“”)

{

$gname=$public_r[sitename];

$gname = urldecode($gname);

$gname = mb_convert_encoding($gname,
‘GB2312’,
‘UTF-8’);

}

$Shortcut =
“[InternetShortcut]

URL=http:
//”.$_SERVER[‘HTTP_HOST’].”/?desktop

IDList=

[{
000214A0
0000
0000-C000-
000000000046}]

Prop3=
19,
2


“;

Header(
“Content-type: application/octet-stream;”);

header(
“Content-Disposition: attachment; filename=”.$gname.
“.url;”);

echo $Shortcut;

?>

 

记住这段帝国CMS专用的。

使用方法

网站目录新建一个desktop.php文件,复制以上代码到PHP文件中保存,直接在需要显示的地方链接这个文件就可以了:

<a href=
“/desktop.php”>保存到桌面</a>

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。