What kind of URL "qptform.php?operation=add&clearform=1&displayform=1&datasheetoff=1" in general?
I am a total noob in programming. I know something about URL but the simple ones like www.google.com, www.yahoo.com but I stumbled sone URL that is qptform.php?operation=add&clearform=1&displayform=1&datasheetoff=开发者_开发百科1
. I know it has something to do with php codes or something but I am not sure... Pls explain to me in general what kind of URL's are these (In general). Pls help...
That is a URL that ends with a query string.
This is not specific to PHP. From the URI Scheme entry on Wikipedia:
foo://username:password@example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose
\_/ \_______________/ \_________/ \__/ \___/ \_/ \______________________/ \__/
| | | | | | | |
| userinfo hostname port | | query fragment
| \________________________________/\_____________|____|/
scheme | | | |
| authority path | |
| | |
| path interpretable as filename
| ___________|____________ |
/ \ / \ |
urn:example:animal:ferret:nose interpretable as extension
When you are in a webpage with a form, there are two main ways to send the data contained in it: POST method and GET method. When you send a form using a GET method, each field in the form along with its value is appended to the url. As you can see, the query string starts with the character '?'. After that, there are some variables (the fields of the form: operation, clearform, displayform, datasheetoff), and the results of each variable (the values of the fields: add, 1, 1, 1). Each one of these assignations is separated with a '&' character.
精彩评论