PHP Security in the random discussion of security settings
The server does not block all security issues, such as program vulnerability issues, user input form issues, PHP file permissions issues, and so on. You can also use some means to confuse
This article explains the PHP upload image and compression of the implementation method, before a "PHP implementation image upload and compression" has been a simple introduction to everyone, the implementation of the upload image and then according
A lot of people think that global and $globals[] are just the difference between the wording, not actually.
According to the official explanation,
$GLOBALS [' var '] is the external global variable $var itself.The global $var is a reference with
PHP automatically generate monthly calendar code
/* Function written by Nelson Neoh @3/2004. For the those who wants to utilize this code, please do not remove the this remark. If you had done a enhancement to this code, please post the copy at
Now many websites will show the time is more humane, such as: XXX 6 seconds before the publication, XXX in 1 minutes before the XX action and so on. Recently in doing related things so also incidentally wrote a, relatively simple, for reference only.
First, the use of PHP to simple calculation of the current number of online Web site methods, simply by computing the visitor's IP address to obtain a general result, can not accurately calculate the current number of people online.
Header (
The sorting methods of sort, asort and ksort arrays in PHP are:
Sort based only on values from small to large, key values do not participate in sorting
Asort Sort by value, key value participates in sort
Ksort sorted by key value, value
How PHP uses the SMTP service to send mail locally
Linux is much easier than this, let's talk about how PHP uses the SMTP service to send mail locally under Windows.
This requires modifying the php.ini configuration file, which requires an
Summary of PHP time operation methods
How do I get the current time in PHP?
How does PHP get the current timestamp?
The first thing to know is that getting the time method in PHP is date (), and the timestamp method in PHP has time (), Strtotime ().
For a strict web development process, any form submission action must undergo rigorous format verification, not only the client to do the JS verification, server-side use of the program two verification is essential.
Here is a class for validating
learning lines and advice for beginners in PHP
(1) familiar with the basic elements of Html/css/js and other Web pages, the completion stage can be self-made simple web pages, the element attributes are relatively familiar.
(2) Understand the
When you purchase a virtual host that does not support Zip_open (),
Also does not support new ziparchive (),
Don't even think it will support exec (), DL () ...
But Gzopen () will always support it.
PHP compression decompression class Pclzip as
In PHP package management, PHP developed slowly, resulting in the result is rarely found that programmers will use tools such as pear. Instead, most developers choose their own framework to handle the code, such as DB interaction, Orim's, Oauth,
Some special handling of images is needed in recent projects-for example, to generate images of any size based on user requests. After some information to find, the final selection of Php_imagick. With ImageMagick, you can dynamically generate
PHP access to the content of several methods of code sharing
Method 1: Use file_get_contents to get the content in the Get mode
Method 2: Use the file_get_contents function to get the URL by post
' Bar '); $data = Http_build_query ($data);
Recently wrote a program in PHP (UTF8 encoding) found that the HTTP get to send an odd number of Chinese characters to the server side will appear garbled, just beginning to think PHP program or service configuration problems.
Later checked for a
In PHP development, encountered this problem, the problem is simplified, as follows:
$arr = Array (1,2,3,4,5,6), $n = 3;foreach ($arr as $key = $val) { if ($val = = $n) break; while (list ($k, $v) = each ($arr)) { echo $v;}
Because each ()
Array_column () function compatible with low version PHP (below version 5.5)
PHP 5.5 adds the Array_column () array function, which is not possible if you need to use it in a low-version PHP environment. This article describes how to implement a
XML-RPC is the acronym for Remote Procedure Call, which translates into Chinese as a long-range process invocation, a technique for invoking a process (method) on a remote machine on a local machine, also known as "distributed computing", to improve
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