$shortCut = "[internetshortcut]url=http://www.xxx.com/?zuomian2015idlist=[{000214a0-0000-0000-c000-000000000046} ]prop3=19,2 "; Header ("Content-type:application/octet-stream"); header ("Content-disposition:attachment; filename= website. url; "); Echo $shortCut;
Save as UTF8 mode, chrome download is normal, IE9 a website to become garbled
Save as ANSI format, chrome download a website to become garbled, IE9 and not become normal
Reply to discussion (solution)
$shortCut = "[internetshortcut]url=http://www.xxx.com/?zuomian2015idlist=[{000214a0-0000-0000-c000-000000000046} ]prop3=19,2 "; Header ("Content-type:application/octet-stream"); $filename = ' website. URL '; $user _agent = $_server[' http_user_agent '];$ Encode_filename = Rawurlencode ($filename), if (Preg_match ("/msie/", $user _agent)) {header (' Content-disposition: Attachment Filename= "'. $encode _filename. ');} else if (Preg_match ("/firefox/", $user _agent)) {header ("content-disposition:attachment; Filename*=\ "UTF8" ". $filename. ' ');} Else{header (' content-disposition:attachment; filename= "'. $filename. '");} Echo $shortCut;
$shortCut = "[internetshortcut]url=http://www.xxx.com/?zuomian2015idlist=[{000214a0-0000-0000-c000-000000000046} ]prop3=19,2 "; Header ("Content-type:application/octet-stream"); $filename = ' website. URL '; $user _agent = $_server[' http_user_agent '];$ Encode_filename = Rawurlencode ($filename), if (Preg_match ("/msie/", $user _agent)) {header (' Content-disposition: Attachment Filename= "'. $encode _filename. ');} else if (Preg_match ("/firefox/", $user _agent)) {header ("content-disposition:attachment; Filename*=\ "UTF8" ". $filename. ' ');} Else{header (' content-disposition:attachment; filename= "'. $filename. '");} Echo $shortCut;
Can I add an ico icon?
iconfile= icon path plus this parameter
iconfile= icon path plus this parameter
$shortCut = "[internetshortcut]url=http://www.xxx.com/?zuomian2015iconfile=/favicon.icoidlist=[{ 000214a0-0000-0000-c000-000000000046}]prop3=19,2 "; Header ("Content-type:application/octet-stream"); header ("Content-disposition:attachment; filename= website. url; "); Echo $shortCut;
This is not working, not responding.
To use HTTP.
To use HTTP.
$shortCut = "[internetshortcut]url=http://www.xxx.com/?zuomian2015iconfile=http://c.csdnimg.cn/public/ favicon.icoidlist=[{000214a0-0000-0000-c000-000000000046}]prop3=19,2 "; Header ("Content-type:application/octet-stream"); header ("Content-disposition:attachment; filename=. url; "); Echo $shortCut;
It's still invalid.
The notation itself is correct, you now actually display the icon is the browser icon it?
You change it to look like this.
Iconfile=http://www.vcoo.cc/favicon.ico
Because the icon format is not required
Reference: http://blog.csdn.net/fdipzone/article/details/50423613
The notation itself is correct, you now actually display the icon is the browser icon it?
You change it to look like this.
Iconfile=http://www.vcoo.cc/favicon.ico
Because the icon format is not required
The same as the ICO, or the browser icon is displayed, is the chrome icon
Reference: http://blog.csdn.net/fdipzone/article/details/50423613
Thank you for writing a long text, but the test is not normal display icons, do not know whether it will be related to the browser and the system
Then I don't know.
In my Place
Iconfile=http://c.csdnimg.cn/public/favicon.ico, No.
Iconfile=http://www.vcoo.cc/favicon.ico can
The notation itself is correct, you now actually display the icon is the browser icon it?
You change it to look like this.
Iconfile=http://www.vcoo.cc/favicon.ico
Because the icon format is not required
Auntie, you haven't retired yet? Happy New Year, huh?
Find out why. If you save the site, the URL is collected in the Favorites folder. The icon is displayed, or the icon cannot be displayed.
Because that icon is read in the browser cache. If the icon does not appear in the cache, it is not displayed.
For example, you want to do a Baidu
Then first to collect Baidu in the browser.
Then iconfile= Baidu's Favicon address