PHP does not cache data headers

PHP does not cache the data header functionnocache_headers () {whyarethese @-silencedwhenotherheadercallsaren & amp; 39; t? @ Header (& amp; 39; Expires: Wed, 11Jan1 PHP does not cache data headers Function nocache_headers (){ // Why are

Php Chinese character truncation function

The string to be intercepted by the Chinese character truncation function. $ num indicates the length of the string to be intercepted. the truncated string publicfunctionsubstrgb ($ in, $ num) {$ num16; $ pos0; $ B Chinese character truncation

Utf8_encode () and utf8_decode functions

Utf8_decode () function decodes the UTF-8 string into a ISO-8859-1, which converts a UTF-8 encoded ISO-8859-1 string into a single-byte ISO-8859-1 string, if successful, the function returns the decoded string; otherwise, false is returned. The utf8_

A function used to calculate the execution time of a program.

Function used to calculate the execution time of a program. functiongetmicrotime () is a function used to calculate the execution time of a program. Function getmicrotime (){ List ($ usec, $ sec) = explode ("", microtime ()); Return (

Phpmb_strlen () Chinese/English mixed character truncation code

If a fatalerror: calltoundefinedfunctionmb_strlen occurs when using mb_strlen, you can use phpinfo () to check whether mbstring is loaded. if not, try to copy php_mbstringdll to the windows directory. If fatal error: call to undefined function

Function for getting the picture inserted by fckeditor

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,

Phpiconvmb_convert_encoding encoding conversion function

Use the iconv function: iconv (& quot; UTF-8 & quot;, & quot; gb2312 & quot;, & quot; abc Sunshine 123 & quot;); it is said that this is better, errors during conversion can be ignored! Iconv (& quot; UTF-8 & quot;, & quot; gb2312ignore & quot; Use

Powerful php checking file types

A powerful file type detection function that can determine the type of the file you upload. using this function, you cannot disguise the file type. the code is as follows: A powerful file type detection function that can determine the type of the

Strong php code conversion functions

This function is powerful. it is much more powerful than the built-in functions in php. This function can automatically obtain your character encoding and convert it to the encoding you want based on your reference, the code is as follows: This

The phpsubstr () function filters 4 numbers at the end.

Today, a customer needs to generate 400 phone numbers in batches at the starting position of 10000. at the beginning, I directly generate a number such as 10004, but merchants do not like this number, here, we can use substr ($ str,-1) 4 to filter

Description of the Chinese truncation function mb_substr () in php

Because the Chinese character is two bytes, it cannot use substr () in the same way as the English and numbers. Fortunately, there is a mb_substr () function in php to handle this problem. Because the Chinese character is two bytes, it cannot use

Working Principle and usage of sessions

I have been using session to store data. I have never summarized the usage and working principles of the session. I will sort it out here today. The introduction here is mainly based on the php language I have been using session to store data. I

Php simple setting and deletion of cookie code

Simple setting and deletion of cookie code in web development usually uses cookies to help us solve some small problems. next we will write a simple code about how to set and delete cookies in the phpcookie function. Simple setting and deletion of

Session and cookie session control

COOKIEcookie of 1PHP is a mechanism for storing data on a remote browser and tracking and identifying users. PHP sends a cookie in the http header. Therefore, the setcookie () function must be called before other information is output to the browser.

Phpmyadmin logon mode is http

Here, we can change its logon mode to http. In this way, as long as the browser is not closed, you can continue to use it. in the ubuntu environment, the php Tutorial myadmin installed using apt-get is used as an example. Here, we can change its

The phpsetcookie value is null or an empty string is used to delete cookie parsing.

Many of my friends will automatically delete the cookie when using setcookie to set the value to NULL or null. next I will analyze the reason why the cookie value is NULL or empty string to delete the cookie. Many of my friends will automatically

Solutions to IE7iframesession loss in php

If you use the iframe method, you may encounter this problem. This problem only exists in the IE 7 browser. I have no problems in testing in firefox, IE6, chrome and other browsers. If you use the iframe method, you may encounter this problem. This

Common Session problems in PHP

1. how to set a session with a long life cycle? Set sessioncookie_lifetime and sessiongc_maxlifetime to a longer time. 2. why initialize the session 1. how to set a session with a long life cycle? Set the time of session. cookie_lifetime and session.

Phpcookie read settings delete instances

Phpcookie read settings delete instance the article uses two instances to describe how php sets cookies, reads cookies, deletes cookies, and other processing methods. Php cookie reading settings delete instance article uses two instances to describe

Solution to the emergence of Warning: session_start () in PHP

Error message: Warning: session_start () [functionsession-start]: Cannotsendsessioncachelimiter-headersalreadysent Error message: Warning: session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output

Total Pages: 12780 1 .... 8861 8862 8863 8864 8865 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.