CopyCodeThe Code is as follows: // Obtain the current domain name:
Echo $ _ server ['server _ name'];
// Obtain the source URL, that is, click the previous URL on this page.
Echo $ _ server ["http_referer"];
$ _ Server ['request _ URI ']; //
Source: php.net
The first release candidate of PHP 5 is finally here! The move from beta stage to RC stage means that PHP 5 is now feature complete, and is quite stable-stable enough for everyone to start playing. note that it is still
Official station: php.mach-ii.com
For PhP4 download
For PhP5 download
By Alan Richmond
Introduction to Mach-II for PHP:
The first beta release of Mach-II for PHP, an open source framework for building Web applications, is now available for
Address: http://www.cnblogs.com/jsckdao/archive/2011/05/05/2038265.html
After setting up the PHP environment for more than N times, there are many methods on the Internet, but there are always some discrepancies in actual operations. Many Errors
This article introduces how to use Ajax and PHP by using an example to download the source code of this instance.ProgramFor better understanding. In the compressed package, functions. JS is the core of Ajax.CodeAll the operations are implemented
Debugging is the simplest (right ?) :It was okay to install PHP, But I copied someCodeTo find out that it cannot be used, you can use your eyes to carefully correct the code in the book. You must have copied the wrong copy or printed the wrong
Added a demo for php implementation to help you understand xgcalendar in php or similar scripting languages. The code may be ugly.
: Http://code.google.com/p/xgcalendar/downloads/list
There is also a demo of gae python version. However, the full
1. Type of input information verification (mainly used to verify the user name, password, repeated password, email address, and other functions)
Copy codeThe Code is as follows: /**
* Validator for Register.
*/
Final class RegisterValidator
Method 1:
Copy codeThe Code is as follows: Function unicode_encode ($ name)
{
$ Name = iconv ('utf-8', 'ucs-2', $ name );
$ Len = strlen ($ name );
$ Str = '';
For ($ I = 0; $ I {
$ C = $ name [$ I];
$ C2 = $ name [$ I + 1];
If (ord ($ c)> 0)
{//
Static variables only exist in local function domains, but their values are not lost when the program runs out of this scope. Take a look at the following example:
Copy codeThe Code is as follows: function test (){
Static $ a = 0;
$ A ++;
Echo $;
Copy codeThe Code is as follows: $ Key = $ _ GET ['key']; // obtain the keyword
$ Select = $ _ GET ['select']; // obtain the search engine Selection
Switch ($ select) // jump to different pages based on different search engines
{
Case "google": //
Gd_info function: obtains information about the currently installed GD library.Getimagesize function: obtains the image size.Image_type_to_extension function: obtains the file Suffix of the image type.Image_type_to_mime_type function: determines the
Crontab is a built-in command in linux.How to Make php run automaticallyThere are many ways to run php automatically. Here we will divide the following DZ and some methods completed through the system and the methods to directly trigger the running
The PHP substr () function can split text. However, if the text to be split contains Chinese characters, you can use the mb_substr ()/mb_strcut function, mb_substr () the usage of/mb_strcut is similar to that of substr (), but an additional
1. How to hide the header version information of nginx
Edit the nginx. conf configuration file and add the following line to http {}:
Copy codeThe Code is as follows: http {
......
Server_tokens off;
......
}
Edit the php-fpm configuration file,
1. DOM Functions
A. DOMDocument-> load ()Purpose: load xml files.Usage: DOMDocument-> load (string filename)Parameter: filename, xml file;Return: if the operation succeeds, TRUE is returned. If the operation fails, FALSE is returned.
B. DOMDocument->
Hardware:
Server: iis 6
OS: windows2003
Php: php5
Mysql: mysql5.0
I encountered many problems during installation. First, I encountered the problem of iis parsing php.
1. There is a php. ini-dist file under the php Directory.
Change his suffix to
I. php running mode in apache
Php is common in apache.
Three working modes: CGI Mode, FastCGI mode, and Apache module DLL
Comparison:
1. Comparison between CGI Mode and module mode:Difference between the two working methods of php in apache (CGI
Because the current browser can recognize the txt document format, if only a text link is provided for the txt document, the content of the txt file is displayed in a new window after clicking it, click Download cannot be implemented. Of course, the
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service