Note: The General independent online Statistics program are statistics online IP number, and this is not accurate for example, LAN visitors, such as companies, school rooms and internet cafes, although the intranet IP is different, but the external
Overview
Streaming (streams) is a feature introduced by the PHP4.3 version, primarily for the purpose of unifying the working methods of files, sockets, and other similar resources. PHP4.3 is a long time away, but many programmers don't seem to be
Overview
Reptiles are a feature that we often encounter when doing a program. PHP has a lot of open source crawler tools, such as Snoopy, these open source crawler tools, usually can help us to complete most of the functions, but in some cases, we
Here are a few of the more common methods:
First, introduce the data table structure involved, four fields:
Copy Code code as follows:
Uid: User ID
Session_id: The system produces session_id,php after the user logs on, but uses
OK header (' http/1.1 ok ');
Set a 404 Header: Header (' http/1.1 404 Not Found ');
Set address to be permanently redirected header (' http/1.1 moved Permanently ');
Go to a new address header (' location:http://www.example.org/');
File Delay
PHP implementation to send mail, commonly used is open source project Phpmailer to achieve, then otherwise, what other good projects?
Workaround:
Use the SMTP protocol to send mail.
In CodeIgniter, use its built-in message class to send mail
Before the web development note wrote a PHP generated thumbnail function, although that function can generate thumbnails, but there is a certain flaw in the production of PNG thumbnail, the background is black, and today wrote a function to make up
String Iconv (String $in _charset, String $out _charset, String $str)When using this function for string encoding conversions, it is necessary to note that if the utf-8 is converted to gb2312, a string truncation may occur.You can resolve this by
PHP projects in a lot of places to use plug-ins, especially when the basic program written very multi-functional by the third party to improve the development of the time, more can use the plug-in mechanism, now say the implementation of Plug-ins.
SUBSTR ();
SUBSTR (str,start,length);
Example: substr (' PHP is very good language ', 4,5);
Output is ve;
When the length of the start>str, then return to ();
substr (' PHP is very good language ', 26,5);
substr (' PHP is very good language ', 4
Because want to do a test server to send file requirements, see PHP support SSH operation, so sorted out the installation process, and share with you.
Installation steps
1. Download PHP extension SSH2Download Address
Copy Code code as follows:
Common file manipulation functions
The first part of the file read and write and create delete rename, etc.
Before we start working on the file, let's decide whether it's a file that can be read-writable or not.
$
The php file should be stored as ANSI, and code can be changed when encoding.
Copy Code code as follows:
Coding for gb2312, most of the Web page is still used gb2312, a small part with Utf-8,
Www.baidu.com unexpectedly two all use,
The simplest way to add a watermark to PHP
PHP Adds a text watermark to the picture
Above is PHP to the image Watermark implementation code, I hope you can master.
If a Web server is real, then you need to know how the Web server works. Start with a static text server to access the Web server 1.html for example
1. The client sends an HTTP request to the server, and if the server listens for a port number of 90
For beginners, as long as the function can be implemented, the other settings completely default.
Preview diagram:
1. First download to the official website, this does not say much. After downloading to the site you want the directory, I place
Download Address: http://www.jb51.net/codes/33397.html
Some features of Snoopy:
1 fetching content from Web pages
2 Crawl page text content (remove HTML tags) fetchtext
3 Crawl page links, form fetchlinks Fetchform
4 Support Agent Host
5 support
1. ArrayThe PHP array is actually an associative array, or a hash table. PHP does not need to declare the size of an array in advance, and you can create an array in a way that is directly assignable. For example:
Most traditional, use numbers to do
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