follows:
The result is as follows:
Array ([dirname] => http: // localhost // url path [basename] => index. php // complete file name [extension] => php // file name suffix [filename] => index // file name) */?>
Third, use the parse_url built-in Function
The Code is as follows:
The result is as follows:
Array ([scheme] => http // protocol used [host] => localhost // host name [path] =>/index. php /
follows:
The result is as follows:
Array ([dirname] => http: // localhost // url path [basename] => index. php // Complete file name [extension] => php // file name suffix [filename] => index // file name) */?>
Third, use the parse_url built-in function
The code is as follows:
The result is as follows:
Array ([scheme] => http // protocol used [host] => localhost // host name [path] =>/index. php /
The following code is the PHP resolution URL and gets the parameters in the URL, as shown in the following code:
Below through four kinds of examples to introduce PHP URL parameter to get the way.
In the case of a known URL parameter, we can use $_get to obtain the corresponding parameter information ($_
[Ubuntu]text (bold)=Ffffffmagenta (Bold)=Ad7fa8text=Ffffffwhite (Bold)=Eeeeecgreen=4e9a06red (Bold)=Ef2929green (Bold)=8ae234black (Bold)=555753Red=Cc0000blue=3465a4black=000000Blue (bold)=729fcfyellow (Bold)=Fce94fcyan (Bold)=34e2e2yellow=C4a000magenta=75507bbackground=300a24white=D3d7cfcyan=06989a[names]count=1NAME0=ubuntuWe only need to copy and save it as the corresponding Xcs file name.A-Tools-color schemeTool--------"color scheme-----------" Imp
HTTP Study Notes-URL and resource, http Study Notes urlWhat is URL?
All things have a standard things, bus line number, plane flight number, personal ID card number, you take a taxi, tell the driver I want to go to Shi Pai, then he can understand what you mean. URL is the standardized name of Internet resources. The URL
First, PHP gets the URL of the current page:
Copy the Code code as follows:
Get the current script URLfunction Getcururl (){if (!empty ($_server["Request_uri")){$scriptName = $_server["Request_uri"];$nowurl = $scriptName;}Else{$scriptName = $_server["Php_self"];if (Empty ($_server["query_string"])){$nowurl = $scriptName;}Else{$nowurl = $scriptName. "?". $_server["Query_string"];}}return $nowurl;}
The other is the value of a variable in the query sect
C # URL short address compression algorithm and short URL Principle example, detailed introduction of the short URL mapping algorithm, the long URL MD5 generated 32-bit signature string, divided into 4 segments, 8 bytes per segment, and then generate a short URL, see text ex
Seo friends now know the importance of URL static, URL pseudo static, and URL rewriting to Seo. Search Engines like static website pages. Today, we will analyze in detail the differences among static URLs, pseudo-static URLs, and URL rewriting.
Static URL. Static
This article transferred from: http://blog.csdn.net/chendi1985/article/details/5291773Window.location method Get URLUniform Resource Locator (Uniform Resource Locator, URL)The complete URL consists of the following parts:Scheme://host:port/path?query#fragmentScheme: Communication protocolCommon Http,ftp,maito, etc.Host: HostsThe server (computer) domain Name System (DNS) hostname or IP address.Port: Port nu
URL rewriting is the process of intercepting incoming Web requests and automatically redirecting requests to other URLs.For example, if the browser sends a request for hostname/101. aspx, the server automatically directs the request to http: // hostname/list. aspx? Id = 101.Url rewriting has the following advantages:Shorten the url and hide the actual path to imp
What is HTTP? Hypertext Transfer Protocol (Hypertext Transfer Protocol-HTTP) is a protocol designed to enable clients and servers to communicate smoothly.HTTP works with Request-response protocol (Request-reply protocol) between the client and the server. Get-gets data from the specified server post-submits data to the specified server to handle the GET method: When using the Get method, the query string (key-value pair) is appended to the URL address
found on the main page, nature will be 404. The above link gives the scenario is the Nodejs back end of the scheme, our solution is to use the Springmvc backend, but the principle is similar: the backend does not know this link, we will redirect the wrong connection to the original # connection, for the backend is a normal access, and the URL of the # The browser side will be removed again by the HTML5 mod
The following describes how to add url parameters to a url and change the url parameters: javascritpurl
The url parameter method is used to add parameters to the url. If the original url contains the parameters, it will be overwri
Add the url parameter to the url, and then add the parameter to the url.
Add object parameters to the url. If the original url contains parametersJs Code
function addToUrl(obj){ var aprotocol = location.protocol; var ahost = location.host; var apath = location.pathname; var
JS get url parameter modify URL parameter remove URL parameterfunction Urlhelper () {var obj= {}; //gets the value of the URL parameter: name is the name of the parameterObj.getquerystring =function (name) {var reg=NewRegExp ("(^|)" + name + "= ([^]*) (|$)", "I"); var r= WINDOW.LOCATION.SEARCH.SUBSTR (1). Match (REG);
JAVASCRITP Add the URL parameter method, the parameter added to the URL, if the original URL is covered, the following through the code examples for you to explain the details, please see below.
The JS code looks like this:
function Addtourl (obj) {var aprotocol = Location.protocol;
var ahost = Location.host;
var apath = Location.pathname;
var asearch =
How do I get a url from the url and jump to it? for example, there is a url in the form of www. abcd. orggo. php? Fromsource amp; gowww.xyz.edu.cn? ------ Solution ------------------ header ( quot; locatio how to obtain a url from the url, and then jump to the
How do I get a url from a url and then jump to it like there is a url in the form of a http://www.abcd.org/go.php? Amp; from = source amp; go = www.xyz.edu.cn ?, How does hea get a url from the url and then jump to the url
For
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.