1, Picture format: The current website Development Common picture format has gif,jpg/jpeg,png ...Difference:gif picture compression rate is high, but can only display 256 colors, may cause the loss of color, can display animationjpg/jpeg picture
In foreach, the number of circular query data is less, but the performance is relatively low, the better solution is to collect the ID, in a one-time query, but this caused the data structure is not we use PHP functions can be merged, today tested:
If you use the Base64_encode and Base64_decode methods directly, the generated string may not apply to the URL address. The following method resolves the problem:
URL-safe string encoding:
Copy Code code as follows:
function
Solve 2 problems:1. The issue of automatic conversion of text data such as identity cards to scientific counting methods .2. The problem of garbled Chinese
The principle that Excel derives from a Web page. When we send this data to the client, we
So if the PHP script doesn't report syntax errors, what is the reason:
1. The general integration environment, the default will open error reporting; But in Linux, it doesn't have to be installed with a package,
At this point you can view the PHP
PHP Conversion file encoding is a relatively simple thing, but in the development of the transfer of Chinese parameters, sometimes do not know what is encoded, the result of the phenomenon of garbled. Here's a very handy solution to automatically
Phpsocketsocket is located in TCP/IP protocol, provides the client-server mode of asynchronous communication, that is, the client to the server to send a service request, the server received the request, provide the corresponding feedback or service!
Copy Code code as follows:
PHP needs to turn on SSL (OpenSSL) support
$apnsCert = "CK.PEM";//Certificate license file when connected to APNs, the certificate needs to be created as required
$pass = "123456";//Certificate Password
$SERVERURL =
In doing a picture preview of the things, encountered a problem, is to determine whether the remote file exists (not the same server).The code is as follows:
Copy Code code as follows:
Method One
function file_exists ($url)
{
Today, the use of code to generate a check code PHP implementation, found that Firefox has always been prompted "image .... Because of its own fault can not show the problem, the author also suggested that "if the browser display" image xxx because
The single example (Singleton) pattern and the Uncommon Multiple (Multiton) pattern control the number of classes in the application. such as the pattern name, a singleton can only be instantiated once, with only one object, and multiple instances
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string enclosed in double quotes, single quotes are not, note: only echo can do this, it is a "function" that can take
The role of is_subclass_of:
Copy Code code as follows:
BOOL Is_subclass_of (Object object, String class_name)
Returns TRUE if the object-owning class is a subclass of class class_name, otherwise it returns FALSE.
Note: The object
If you also want to get the size information of the Flash file by parsing the SWF file header information, that's a bit far away. Since PHP 4 has been built into the getimagesize function to do this. Its function determines the size of any
PHP function Strip_tags provides the ability to remove HTML and PHP tags from a string, which attempts to return the result of a given string, STR, that removes null characters, HTML, and PHP tags.
Because Strip_tags () cannot actually validate
What is write-time copy (copy on write)?
A: When copying an object, it is not true to copy the original object to another location in memory, but rather to set a pointer to the source object's location in the memory-mapped table of the new object.
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