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 =
Introduction: This is Php.Program: Virtual Domain Name Service DIY detailed page, describes and PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: //
Editor's note: friends who have used NetEase's my.yeah.net domain name to switch to the service must be interested in its powerful functions? Once you have applied for your own virtual domain name, such as coolfish.yeah.net, visitors can use this
How to solve JS cross-domain problemJS cross-domain problem is one of the most common problems that web developers encounter. The so-called JS cross-domain problem, refers to the page under one domain through the JS access to another different
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
PHP gets the current script URL (only path)
Copy CodeThe code is as follows:
function Getcururl ()
{
if (!empty ($_server["Request_uri"))
{
$scrtName = $_server["Request_uri"];
$nowurl = $scrtName;
}
Else
{
$scrtName = $_server["Php_self"];
if
PHP Tutorial Configuration Chinese Narration
Let's see what you see, php.ini.
[PHP]
;;;;;;;;;;;; WARNING;;;;;;;;;;;;; This is the default settings file for new PHP installations.; By default, PHP installs itself with a configuration suitable for;
What we are introducing to you today is a concrete way to get the function of the current URL of PHP, through the understanding of this function method, further deepen our understanding of the PHP language, improve our learning level.
Examples of
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.