The two most common functions for PHP programmers are require_once and include. through these two functions, we can use classes and other objects defined in other class libraries, but many people use
The two most common functions for PHP programmers
Summary: many friends are confused about the traditional and simplified versions of the website. how can this problem be achieved? This is also a very important point missed in many PHP books. Collected by the Author
Summary: many friends are
First, please refer to the addslashes () function in English, which can achieve the functions you want, you should also refer to the magic_quotes_gpc option set by php3ini. Function ereg_replace
First, please refer to the addslashes () function in
Cache display is reset to the default value of session_cache_limiter when the request starts. Therefore, you need to call session_cache_limiter () foreveryrequest (before session_start)
Session_cache_limiter () returns the name of the current cache
First, I opened the extensionphp_curldll function in phpini in Cwindows, and then restarted apapche. The following is what I wrote to capture PHP information in Baidu:
Php curl_init function usage
First, in php. ini in C \ windows, I opened the
After a while on the Internet, google found that it was very troublesome to write images inserted in articles through fckeditor. after studying the regular expressions for one afternoon, I just started learning, after writing the following function,
Fopen is a very good function to collect remote server content and save it to a local location. let's take a look at failedtoopenstream when using the fopen function: HTTPrequestfailed solution.
Fopen is a very good function to collect remote server
The iconv function can convert a known character set file to another known character set file. For example: converting from GB2312 to UTF-8, iconv functions are built in php Tutorial 5, and the GB character set is opened by default.
In PHP, iconv
PHP provides a rarely used similar_text function, but this function is very useful for comparing two strings and returning a percentage of similarity. the instance code is as follows:
PHP provides a rarely used similar_text function, but this
This is a bit like if the mysqlint type is exceeded, and we only need to use bigint, so this type of problem may also occur due to the int data range in php. Encoding
This is a bit like mysql int type overflow when it exceeds, and we only need to
The strtr function of PHP has a higher performance than the str_replace function. strtr can be used instead of str_replace in two forms: stringstrtr (string $ str, string $ from, string $)
The strtr function of PHP has a higher performance than the
Among the many predefined SERVER variables in PHP, $ _ SERVER [REQUEST_URI] is frequently used, but this variable is only supported by apache. therefore, we need a more general method to obtain the value of REQUEST_URI.
Among the many predefined
Both json_decode and var_export have the second parameter. I have never paid attention to it before. T_T and the var_export function is also the first time I know about it.
Both json_decode and var_export have the second parameter. I have never
Let's take a look at the exec function usage method. exec () prototype: stringexec (stringcommand [, stringarray [, intreturn_var]) exec (
Let's take a look at how to use the exec function.
Exec () prototype: string exec (string command [, string
To set the php survival validity period, we can use the session_set_cookie_params function or modify the phpini file. The following is a brief introduction. Method 1: session_set_cook
To set the php survival validity period, we can use the
In php, there are a lot of questions about setting the session value or directly setting the expiration, expiration, and validity period. The following small series will show you how to use it. Let's take a look at p
In php, there are a lot of
The phpsession () function has a very important role in php application development. next I will give a brief introduction to the usage and examples of phpsession () functions for beginners. Comparison
The php session () function has a very
In php, cookies and sessions are often used in combination. However, the cookie security is not as high as the session, and the session is only on the server and the cookie is on the client. this naturally understands their region.
In php, cookies
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