Code for creating a page desktop shortcut in PHP or ASP _php tutorial

Source: Internet
Author: User
Create a new PHP document: The name is good to remember. such as: shortcut.php
Content in the PHP documentation:
Code
Copy CodeThe code is as follows:
$Shortcut = "[Internetshortcut]
url=http://www.jb51.net/
idlist=
[{000214a0-0000-0000-c000-000000000046}]
prop3=19,2
";
Header ("Content-type:application/octet-stream");
Header ("content-disposition:attachment; filename= script House. url; ");
Echo $Shortcut;
?>

To make sure you have the Favicon.ico file in the root directory of your Web site,
Upload to website, visit address: http://www.jb51.net/shortcut.php will be prompted to download a home named script. url file, saved locally is a shortcut!
The following is the ASP implementation code:
Copy CodeThe code is as follows:
<%
Id=int (Request ("id"))
If id= "then id=" 1 "
Title=request ("title")
If title= "then title=" Script Home "
Shortcut = "[Internetshortcut]" & vbCrLf
Shortcut = Shortcut & "url=http://www.jb51.net/article/" &id& ". Htm?desktop" & VbCrLf
Shortcut = Shortcut & "idlist=" & VbCrLf
Shortcut = Shortcut & "[{000214a0-0000-0000-c000-000000000046}]" & VbCrLf
Shortcut = Shortcut & "prop3=19,2" & VbCrLf
Shortcut = Shortcut & "" & VbCrLf
Response.AddHeader "Content-disposition", "Attachment;filename=" &title& ". url;"
Response.ContentType = "Application/octet-stream"
Response.Write Shortcut
%>


It is important to note that because of possible security issues that are locked
The following actions are required, in the script house. URL--Right---"Properties--" unlocked to access, this is like a CHM file downloaded on the Internet needs a similar operation.

http://www.bkjia.com/PHPjc/321474.html www.bkjia.com true http://www.bkjia.com/PHPjc/321474.html techarticle Create a new PHP document: The name is good to remember: shortcut.php the contents of the PHP Document: Code Copy Code code is as follows: PHP $Shortcut = "[Internetshortcut] url=http:// Www.jb51.net/I ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.