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']. ""; // obtain the root variable of the server document
PHP has become the most popular WebProgramming LanguageMy heart also began to itch. Well, let's start learning PHP from today.
1. appservnetwork
First, let's download something related to PhP.
First, we will download a complete set of
1. Install nginx
Sudo apt-Get install nginx
2. install PHP
Sudo apt-Get install php5-cgi
3 install spawn-fcgi
(There are manyArticleInstall Lighttpd and disable it during startup. Actually, this is not required)
Sudo apt-Get install
ArticleDirectory
Version 4.4.0
I published it yesterday. I don't know why the rss I subscribed to is not displayed. Not much changed than 4.3.11, mainly because of bug fixes.Bytes ------------------------------------------------------
Category 1:For the following optional options, value should be set to a bool value:OptionOptional valueRemarks
CURLOPT_AUTOREFERERWhen Location: redirection is performed, the Referer: Information in the header is automatically
Copy codeThe Code is as follows:
// Pki encryption// Openssl extension must be enabled for pki encryption.
// Php. ini extension = php_openssl.dll extension
/* The pki mode is
* Public key encryption and Private Key decryption;
* Private key
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)
{//
Method 1:According to the official manual, if the safe mode settings of the php tutorial are too harsh, the following situation may occur: although the file actually exists, it is also reported that the file does not exist.
Because the php. ini
When a group of friends collected the webpage last night, they found that the webpage obtained by file_get_contents was saved as garbled code locally, and Content-Encoding: gzip in the Response header
But it is normal in the browser.Because I have
JS is the front-end language, PHP is the background language, and the front and back-end are often unclear at the beginning (I did it at the beginning, and now I am also committing a crime ), my original idea was to regard the frontend and backend
If you have installed xdebug, you can use xdebug_debug_zval () to display "zval" information. As follows:
Copy codeThe Code is as follows: $ Str = "jb51.net ";
Xdebug_debug_zval ('str ');
Result:
Str:(Refcount = 1, is_ref = 0 ),String 'jb51. net'
The simplest way is to add the following code directly to the php program code:
Copy codeThe Code is as follows: error_reporting (E_ALL ^ E_NOTICE ^ E_WARNING );
Disable all notice and warning errors.
Put this statement in the function inclusion
Mb_convert_encoding is used to convert the encoding. I have never understood the concept of program encoding, but now it seems a bit open.
However, the English language generally does not have Encoding Problems. Only Chinese data can have this
Here I want to summarize some information about the path where the URL and file in the address bar belong to me:With $ _ SERVER [], we can accomplish many things: it is an array containing headers, path information, and script positions. The array
JSON (JavaScript Object Notation) is a lightweight data exchange format.
In short, both xml and json are used to facilitate data exchange between the client and the server, especially for Object-type data, such as the most common array.
The
PHP provides two methods for regular expression text processing. One is the PCRE method (the PCRE Library implements a slightly different syntax and semantics from perl 5 (see below) function set of the regular expression pattern matching function.
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