Read about requested url not found on server php, The latest news, videos, and discussion topics about requested url not found on server php from alibabacloud.com
CodeIgniter method for lighttpd server URL rewriting. CodeIgniter method for lighttpd server URL rewriting because the development environment uses the lighttpd server, and my local environment uses Apache configuration, resulting in deployment to the development machine, al
This article provides a detailed analysis of functions used to obtain the current url path using PHP and the implementation methods of server variables, if you need a friend, refer to PHP to get the function and server variable of the current
=222″
$_server["script_name"] = "/index.php"
$_server["php_self"] = "/index.php"
3,http://www.biuuu.com/index.php?p=222q=biuuu
Results:
$_server["query_string"] = "p=222q=biuuu"
$_server["Request_uri"] = "/index.php?p=222q=biuuu"
$_server["script_name"] = "/index.php"
$_server["php_self"] = "/index.php"
$_server["Query_string"] gets the query statement, in the instance, gets the following value
$_server["Request_uri"] gets the value after http://www.biuuu.com, including/
$_server["Script_name"]
$ _ Server problem. Why can't I disable index. php's host url rewriting?
$ _ SERVER ['path _ info'] will disappear,
Instead
$ _ SERVER ["ORIG_PATH_INFO"]
As a result, the removal of index. php will become invalid based on $ _ SERVER
This article provides a detailed analysis of functions used to obtain the current url path using PHP and the implementation methods of server variables, if you need a friend, refer to PHP to get the function and server variable of the current
Example of PHP getting functions and server variables of the current url path
$ Path =/var/www/../ect/abcd;
Echo $ _ SERVER ['document _ root'].""; // Obtain the root variable of the server document (depending on the configurati
How the PHP site does not allow the file behind the URL to exist, not to show important information about the server
For example, HTTP +/url/abc.asp If this file does not exist,
Displays the error interface as shown (picture one),
But in the error message, it will reveal information about the
PHP retrieves the functions and server variables of the current URL path:
Code:
Copy codeThe Code is as follows: $ Path =/usr/opt/../ECT/ABCD;
Echo $ _ server ['document _ root']. "Echo $ _ server ['php _ Self ']. "Echo _ fil
A few days ago, I helped my friend solve the MSSQL database connection problem after the website was migrated. Then I set up its code locally to test the environment and found an ASP problem and solved it, it also helped my friend solve the problem. So today I would like to tell you a mistake in ASP. Although ASP programs are rarely used, there are still a lot of errors.Okay. Go to our topic. First, let's take a look at the demo environment. First
PHP Gets the function and server variables for the current URL path:Code:
Copy Code code as follows:
$path =/usr/opt/. /ECT/ABCD;
echo $_server[' Document_root ']. " echo $_server[' php_self ']. " echo __file__. " echo dirname (__file__); function to get the folder path where the file resides
echo Realpath ($pah);
?>
the value returned:
Copy Code code as follow
Scene:
The server generates URLs based on user input.
Crawl URLs via file_get_contents.
The Web page may not exist.
This happens quite frequently, causing Error_log to appear many PHP warning:file_get_contents (xxxxxxxxxxxxxx): Failed to open stream:http request failed!
What should I do to make this mistake not appear in Error_log?
Reply content:
Scene:The server
"] gets the path to the current script, such as: index.php$_server["Php_self"] The file name of the script that is currently executingCurrent URL: "/http". $_server[' http_host '].$_server[' php_self ']To summarize, for Query_string,request_uri,script_name and php_self, deep understanding will help us to correctly invoke these four values in the $_server function. The differences between the four variables are mastered by Query_string,request_uri,scri
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.