------------asp----------
<%
Response.ContentType="APPLICATION/OCTET-STREAM"
Response.AddHeader "Content-Disposition","attachment;filename="&"网页吧.url"
Response.Write("[InternetShortcut]")&Chr(13)
Response.Write("URL=")&Chr(13)
Response.Write("IDList=")&Chr(13)
Response.Write("[{000214A0-0000-0000-C000-000000000046}]")&Chr(13)
Response.Write("Prop3=19,2")&Chr(13)
Response.End
%>
-----------php------------
<?php
$Shortcut = "[InternetShortcut]
URL=http://116.la
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
";
Header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=116啦网址导航.url;");
echo $Shortcut;
?>
------------------
Response.ClearContent();
Response.Charset = "gb2312";
string sitename = "youjiang";
Response.AddHeader("content-disposition", "attachment; filename=" + sitename + ".url");
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.ContentType = "APPLICATION/OCTET-STREAM";
Response.Write("[InternetShortcut]/r/n");
Response.Write("URL=/r/n");
Response.Write("IDList=/r/n");
Response.Write("[{000214A0-0000-0000-C000-000000000046}]/r/n");
Response.Write(" Prop3=19,2/r/n");
Response.End();
中文标题解决办法
Response.ClearContent();
if (HttpContext.Current.Request.Browser.Browser != "IE")
{
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=/"友奖网.url/"");
}
else
{
string sitename = HttpUtility.UrlEncode(System.Text.Encoding.UTF8.GetBytes("友奖网.url"));
Response.AddHeader("content-disposition", "attachment; filename=" + sitename);
}
Response.ContentType = "APPLICATION/OCTET-STREAM";
Response.Write("[InternetShortcut]/r/n");
Response.Write("URL=/r/n");
Response.Write("IDList=/r/n");
Response.Write("[{000214A0-0000-0000-C000-000000000046}]/r/n");
Response.Write(" Prop3=19,2/r/n");
Response.End();
------------------
如果觉得《把网站网址放到桌面 创建网址桌面快捷方式》对你有帮助,请点赞、收藏,并留下你的观点哦!