Heim  >  Artikel  >  Backend-Entwicklung  >  PHP将网页设置为桌面快捷方式

PHP将网页设置为桌面快捷方式

WBOY
WBOYOriginal
2016-06-20 13:03:101021Durchsuche

在不少的SNS类网站、论坛中,能看到一些个将网页设置为桌面快速方式的按钮!

此版本支持多浏览器!

<html>
<head>
    <title>将网页设置为桌面快捷方式php版 - scutephp.com</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<a href=&#39;shorturl.php&#39;>保存到桌面</a>
</body>
</html>

其中shorturl.php文件的源码如下:

<?php
    $Shortcut = "[DEFAULT]
    BASEURL=http://
www.scutephp.com/
    [InternetShortcut]
    URL=http://www.scutephp.com
    IDList=
    IconFile=http://www.scutephp.com/favicon.ico
    [{000214A0-0000-0000-C000-000000000046}]
    Prop3=19,2
    ";
    header(&#39;Content-Type: application/octet-stream&#39;);
    header("Content-Disposition: attachment; filename=PHP建站教程.url");
    echo $Shortcut;
?>

 


Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn