: This article describes how to obtain php paths. For more information about PHP tutorials, see. Php retrieves the url path of the current page
# Test URL: http: // localhost/blog/testurl. php? Id = 5 // Obtain the domain name or HOST address echo $
Usage of the PHPheader () function (incorrect settings such as 301 and 404)
Header ("HTTP/1.1 404 Not Found ");
For the ErrorDocument 404/404. php function in apache configuration
Error_page 404/404
System variables and environment variables in php
This article describes how to learn about system variables and environment variables in php.In daily php programming, system variables and environment variables are sometimes modified to
A handy php paging class
/**
Paging query class
@ Link http://bbs.it-home.org
*/
Class paging
{
Private $ pageSize; // the default number of items displayed on no page is 10.
Php server variable $ _ SERVER introduction. SERVER variable $ _ SERVER Summary: $ _ SESSION [PHP_SELF] -- get the file name of the currently executing script. $ _ SERVER [SERVER_PROTOCOL] -- Name of the communication protocol and SERVER variable on
Malicious refresh means to constantly refresh the submitted page, resulting in a large amount of invalid data. The following is a summary of php's methods to prevent malicious page refreshing:
A verification string must be passed between pages,
A
Php obtains the php server variable in the current url path.
Programming in php to obtain the current url address and server variables mainly uses the following global variables: $ _ server ["query_string"], $ _ server ["request_uri"], $ _
$ _ SERVER ['server _ SIGNATURE '] # a string containing the SERVER version and virtual host name. $ _ SERVER ['path _ TRANSLATED '] # Basic PATH of the file system where the current script is located (not the root directory of the document.
$ _
The port used by the server. The default value is "80 ". If you use an SSL secure connection, this value is the HTTP port you set.
For example, I need to obtain the current URL address.
$ Url_this = "http: //". $ _ SERVER ['http _ host']. $ _ SERVER
Key points for learning the digital paging effect of PHP self-training projects: 1. LIMIT usage 2. parameters 3. hyperlink call 1: First set the digital paging module in the file; my file is (blog. php) paging module $ _ page $ _ GET [page]; $ _
? Php // Obtain the domain name or HOST address echo $ _ SERVER ['http _ host']. br; // Obtain the webpage address echo $ _ SERVER ['php _ SELF ']. br; // Obtain the url parameter echo $ _ SERVER [QUERY_STRING]. br; // detailed address of the source
Php file contains Chinese garbled characters. Do you know how to parse garbled text into Chinese? & Lt ;? Phpclass & nbsp; database {************************************** * **************** & nbsp; mySQL ???????????? * ****** How to solve the
Evening excitedly to the MacBook configuration environment, (apache+php self-enabled) installed MySQL 5.6, after installation, the terminal can normally log in, view the database, but I wrote a local php test link MySQL script, has been unable to
Use the php file Upload idea and implementation, read the specific idea and implementation of using php file upload. for file upload, we need to use the type = file type of the form in HTML and its enctype attribute. This is what we all need. Of
Like most structured programs, there are so-called global variables and local variables. php also has the same processing method in this respect. When php programs are executed, the system retains a region of global variables in the memory. You can
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.