Now commonly used in the application development of the interface, its data is through the open Internet transmission, the data security requirements, in order to prevent the data in the transmission process was tampered with, commonly used data
Recently in the study of chat room technology, because I am doing PHP, definitely want to start from PHP, even a chat room, download the address:
Http://pan.baidu.com/s/1dDWsbip
Password: I2QZ
is in practice, ready to do a PHP chat room system
The socket way does not go to the TCP layer, TCP way will go to the IP layer. Therefore, theoretically, the socket connection method is more efficient.Comparison of TCP and UNIX domain sockets
TCP is using TCP ports to connect 127.0.0.1:9000
This code is used in thinkphp.
1. Introducing the Class
The code is as follows
Copy Code
Vendor (' Phpexcel.phpexcel ');//The extension class is introduced. Yes/ vendor (' PHPExcel.PHPExcel.IOFactory ');
The following are just the main program sections:
The code is as follows
Copy Code
/*****************************************Author: Chong Xing/arcow****************njj@nuc.edu.cn*******************PHP import CSV file to
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 code is as follows
Copy Code
/*php image with text Watermark class LibraryThis class library only supports the text watermark temporarily, the position is the lower right corner, the color is random Call Method:1, the need to
PHP time is generally used in the form of large integers is stored and called. The time () function returns a Unix timestamp for the current time.
Definitions and usage
The time () function returns a Unix timestamp for the current time.
Grammar
Set scheduled Task execution PHP file in Windows
1, write a PHP program, named test.php, the content is as follows:
The code is as follows
Copy Code
?$fp = fopen ("Test.txt", "A +");Fwrite ($fp, Date ("Y-m-d h:i:s").
Today in the PHP tutorial development commonly used in the database tutorial operation method Function Summary analysis, hope that interested friends can refer to.First, the database operation1. Connect MySQL DataMySQL Tutorial _connect ()
Tips and
We need to pass in the URL of the Chinese character or other special characters such as HTML, there always seems to be a variety of chaos, different browsers for their coding is not the same,
For Chinese, the general practice is:
Before passing
First, understand what PHP-FPM is.
PHP-FPM is a PHP fastcgi manager that is used only in PHP.
PHP-FPM is actually a patch of PHP source code, designed to integrate FASTCGI process management into the PHP package. It must be patch to your PHP
Var_dump ()
void Var_dump (mixed expression [, mixed expression [, ...]])
The Var_dump () method is to determine the type and length of a variable and output the value of the variable if the variable has a value that is the value of the variable
Let's assume that we need such an extension to provide a function called tao_string, whose main function is to return a paragraph of characters. The corresponding PHP code may be like this:
The code is as follows
Copy Code
After trying in Linux
Crontab-e
Direct edit
0 * * */usr/bin/php/var/www/html/business/crontab.php
If you have require other files in your crontab.php, execution may be problematic, so it is recommended that you do not use this method.We can do
To replace all images or the connected alt title, we must use the regular function. Let's look at an alt instance that replaces the image.*/Preg_replace ('# alt = "[^"] * "# I', 'alt =" ". $ title." "', $ str );/*Mixed preg_replace (mixed pattern,
Php and html separation program// QQ: 695703951, I don't know the master's brother. I have some personal instructions. Learn fast...Class fc_view{Var $ fc_dir;// Specify the DirectoryVar $ fc_file;// View fileVar $ fc_aval = array ();// ArrayVar $
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