准备在网页里加一个按钮,点击生成桌面快捷方式的功能。最好是不要自己控制到什么地方,直接就下载到桌面,快捷方式最好有ico图标的。求帮忙解答
解决方案 »
- 怎么获取文本域textarea的高度和宽度?
- 关于callback和token
- -_-! php里的变量范围问题
- php扩展问题,救命啊 十万火急!!!
- 请教 "统计今天发贴数 "的sql语句,发贴时间字段是时间戳,谢谢
- 没分了 帮个忙吧
- 我需要处理字符串,看我找不到可以满足要求的函数,熟悉字符串函数的来看看
- eWebEditor3.8 for php版本 在添加wmv格式文件时的问题
- 在线讨教:上传表单不能自动提交??!!
- 如何实现php查询某个用户输入的信息,别的用户不能访问?
- 请教高手: windows 2003 PHP 提示 No input file specified.
- PHP有拦截器(过滤器)的功能吗?
$Shortcut = "[InternetShortcut]
URL=http://www.vcoo.cc
IDList=
IconFile=http://www.vcoo.cc/favicon.ico
IconIndex=1
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2";
Header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=微酷博客.url;");
echo $Shortcut;
2楼的代码我也用过,是自己控制下载到哪。而且也没ico图标
就是uc那样可以从导航栏发送到手机桌面的效果
不受控也行,可以提示下载,但要直接下载快捷方式到桌面。
<?php
$Shortcut = "[InternetShortcut]
URL=http://www.m1905.cn/
IDList=
IconIndex=43
IconFile=C:\\Windows\system32\SHELL32.dll
HotKey=1626
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
";
$ua = $_SERVER["HTTP_USER_AGENT"];
$filename = "手机电影网.url";
$encoded_filename = urlencode($filename);
$encoded_filename = str_replace("+", "%20", $encoded_filename);
header('Content-Type: application/octet-stream');
if(preg_match("/MSIE/", $ua)){
header('Content-Disposition: attachment; filename="'.$encoded_filename.'"');
}else if(preg_match("/Firefox/", $ua)){
header('Content-Disposition: attachment; filename*="utf8\'\''.$filename.'"');
}else{
header('Content-Disposition: attachment; filename="'.$filename.'"');
}
echo $Shortcut;
?>怎么样可以指定地方呢