[Original address] ASP. net mvc Framework (Part 2): URL Routing[Original article publication date] Monday, December 03,200 AM
Last month, I published the first article in my series of posts, which will discuss the new ASP. NET MVC framework we are
How does the PHP tutorial CMS support Chinese path? Phpcms Chinese URL How to set it?
I'm going to come down here.
First, in the phpcms include directory, there are global.func.php files.
The function createhtml ($file) is
In the first part of this series, we created an e-commerce website with three types of URLs:
We create a ProductsController class like the following to process these URLs:
After adding the above class to our application, the asp.net mvc Framework
Use JS to extract the domain name (domains) in the URL, with the split () function on it.
Because a correct URL must be http://or https://, domain, path/parameter composition, so you can use split to/to divide the group, take the 3rd part is the
: This article mainly introduces how to obtain the current url path and server path by PH (obtain the server path of the current path by url). If you are interested in the PHP Tutorial, refer to it. The following are some of the information. I hope
URL path is the address of the site page, usually, a page only exists a valid address, so that the page is unique, but also for the search guide to judge the entrance of the page has provided help. But some programs themselves have dynamic, static,
Here are some of the sorting, PHP to get the path of the small knowledge, hope to help you!
1,$_server["query_string") Description: Query string 2,$_server["Request_uri"] Description: The uri3,$_server["Script_name" required to access this page
The class that gets the URL information
Using this class, you can obtain the following information about the URL:
-Host
-Path
-Statuscode (eg. 404,200, ...)
-HTTP Version
-Server
-Content Type
-Date
-the whole header string of the URL
Copy
one, URL path access and module controller URL Module (controller) Action (METHOD) That is, the relationship between the above three URLs: http://127.0.0.1/projectName/index.php/ module / action1, thinkphp provisions, two points• first, all main
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.