Use the website to send materials

Source: Internet
Author: User
Tags php source code

Introduction: This is a detailed page for using the web site to transfer information. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 324407 'rolling = 'no'>

Readers who know HTML (hypertext mark language) should know that the information can be sent back to the HTTP server by adding the "get" and "Post" parameters in the "<form>" label, in PHP, we can also use the "get" and "Post" parameters. In addition, you can add "get" information to the website. For example, we use the following URL as an example:

Http://www.yourserver.com/download/down.php? Id = 1
Http://www.yourserver.com/news/show.php? Page = 1

These URLs are usually used most in the search engine of a website. The URL you see contains various parameters to send data back to the HTTP server for relevant information. If you think this method is not good, I have another method to add the transmitted data to the URL, for example, the following url: http://www.yourserver.com/vote/php/show.php/200#/4268 /.

The corresponding PHPSource codeAs follows:

<��
$ Url_variable = Split "/" $ path_info
// Obtain the website information
Array_splice $ url_variable 0 1
// Records except the first blank
$ Category_id = $ url_variable �0
$ Product_id = $ url_variable 1
>

Using this method, you can also obtain data, but note that the data order on the URL is the same as that in the "array" (array, therefore, if the output URL information is incorrect, the server will encounter an error when reading the data, which requires attention.

In addition, to output the Chinese font to the URL, you must first use the "rawurlencode" function to convert the Chinese font to rfc1738 encoding to achieve the desired display effect.

From: <a href = http://www.ccidnet.com/html/tech/web/2001/09/28/58_3363.html> SCID </a>

More articles on "using the website to send materials"

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/324407.html pageno: 15.

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.