PHP reference (is to precede the variable or function, object, etc. with & symbol)
References in PHP mean that different names access the same variable content.There is a difference between the pointers in the C language. The pointer in C language
Here are some commonly used PHP array functions, we will test the use of PHP array arrays OH
Sixth chapter (3) The correlation processing function of the arrayCurrent (array name) outputs the value of a string in an array, starting with the
Fifth chapter (1) method of declaring stringsThe definition of the string:Double quote "" 1. You can execute variable 2 in double quotes. You can use the escape characterSingle quote ' 1. Cannot execute variable 2 in single quotes. Only partial
Scripting code
The code is as follows
Copy Code
if [-e/var/lock/subsys/502]ThenKillall-9 Curl 2>/dev/nullKillall-9 PHP-FPM 2>/dev/nullKillall-9 php-cgi 2>/dev/nullService PHP-FPM Start >/dev/nullecho "[' Date +
PHP Installation Configuration Method One
1. Get installation files: http://www.php.net/downloads.php php-5.3.8.tar.gz
To obtain the support files needed to install PHP: http://download.111cn.net/download/netlong339/1351852 libxml2-2.6.32.tar.gz
2
Download the latest version from HTTP://PECL.PHP.NET/PACKAGE/SOLR.
Run after decompression:
Phpize
./configure
Make install
Copy an extended file under the/ETC/PHP.D, and change the load extension to solr.so. Restart php-fpm load SOLR extension:
I wrote a simple php curl encapsulation function that supports HTTPS three years ago. At that time, I only knew why. Now I will take a look at it in detail.Https server post data The code is as follows:Copy code Function curlPost ($ url, $ data,
Method 1: copy + unlinkMy idea is: move = new + delete. Create a folder in the target directory before moving the folder, copy the file and directory, and delete the folder. The code is as follows:Copy code /*** @ ParammoveDir cut the file and
It is not difficult to implement this function, but I have learned a lot. The code is as follows:Copy code /*** Generate a certain number of non-repeated random numbers* @ Param int $ min, $ max specifies the range of random numbers* @ Param int
The code is as follows: The code is as follows:Copy code // Range is an array of columns from 1 to 100.$ Numbers = range (1, 1,100 );// Shuffle will immediately disrupt the array orderShuffle ($ numbers );// Array_slice retrieves a segment of
PHP has always believed that the database is omnipotent, but efficiency and database bottlenecks are seldom considered for the purpose of implementing functions. For example, when you query a database in a loop, it is very undesirable to query the
Each URL is replaced by 6 characters, and (32 ^ 6) can have up to 1,073,741,824 short URLs. Of course, you can also record more detailed information, such as access records and creation time. If it is not enough, you can delete it for a long time.
Open commands. php in the editor/filemanager/connectors/php directory and find the FileUpload function. The code is as follows:Copy code $ SExtension = substr ($ sFileName, (strrpos ($ sFileName, '.') + 1 ));$ SExtension = strtolower ($
A recursive function is a self-called function that calls itself directly or indirectly in the function body. However, you must set the self-called conditions. If the conditions are met, the function itself is called, if not, terminate the
PHP cookie usage The code is as follows:Copy code Setcookie ('mycooker', 'value ');// Function prototype: int setcookie (string name, string value, int expire, string path, string domain, int secure)Echo ($ mycookie );Echo ($ HTTP_COOKIE_VARS
Key technologiesThis example mainly uses the filectime () and filemtime () functions to detect the last change time and last modification time of the incode of the file, and uses the date () function to format the timestamp returned by the detection.
"->" (Minus sign, right angle bracket)Used for functions or objects in the category class, such: The code is as follows:Copy code Class Test {Function do_test () {echo "Doing foo .";}}$ Bar = new Test; $ bar-> do_test ();?> "=>" (Equal sign,
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