GL Host:GL Host-Free hosting of the Php,mysql cpanel no ads!
Fast:This is the fastest and expanding professional free virtual hosting you've ever seen.
Stability:Security and stability--what is glhosting.info think first.
Free Phone:We offer free
As in the following example:
The code is as follows
Copy Code
$foo [1][' a '] [' xx '] = ' bar 1 ';$foo [1][' B '] [' xx '] = ' bar 2 ';$foo [2][' a '] [' bb '] = ' bar 3 ';$foo [2][' a '] [' yy '] = ' bar 4 ';$foo [3]['
Number of randomly generated numbers
Mt_rand () function
The code is as follows
Copy Code
$num = Mt_rand (0,9999999);
But if I want to randomly generate strings how to operate, the Web site finds a way.
Regular expressions
The code is as follows
Copy Code
echo Preg_replace ("/([^s]+) *\1{2,} ([^s]+) * *", ", $string);
With the loop I wrote a
Example 1
The code is as follows
Copy Code
The code is as follows
Copy Code
The code is as follows
Copy Code
mysql_connect (' localhost ', ' root ', ');mysql_select_db (' News ');mysql_query (' Set names GBK '); $sql = mysql_query ("select * from
Multiple inheritance is not supported in PHP, what can we do if we implement code reuse to methods that use multiple classes? That's the combination. In a class, set another class as a property.
The following example simulates multiple inheritance.
/*
The code is as follows
Copy Code
int Preg_match_all (string $pattern, String $subject, Array & $matches [, int $flags [, int $offset]]);
Searches for all patterns that match regular expressions and presents
count.php
The code is as follows
Copy Code
$aid = isset ($_get[' aid '])? $_get[' aid ']: ';$t = isset ($_get[' t '])? $_get[' t ']: ';if (Intval ($aid)){if ($t = = ' Show '){echo "document.write (' 120 ');";}Else{$conn =
recently for ivory, a bit of suspicion, after a recent period of crazy water finally got the ivory, hehe, today again out of the lake, think of the forum seems nothing for the novice to tell the upload instance, and this part is very commonly used,
Zijidelu Web site Log directory/home/hosts_logThe log file has a corresponding site ID
Zijidelu php-cgi Log Directory/usr/local/php_fcgi/logsPhp-fpm.logSlow.log
Viewing log files Basically solves the problem, my side of the client site is invaded
When writing a program, summarize a little experience, how to take only the data in double quotes of strings
For example: $aihao = ["\u7f8e\u98df", "\U4EA4\U53CB", "\u5176\u4ed6"], take out \U7F8E\U98DF
Preg_match_all ('/\ "(. *?) \ "/", $aihao,
A regular expression that matches the URL of the URL:
The code is as follows
Copy Code
(((F|HT) {1}tp://) [-a-za-z0-9@:%_\+.~#?&//=]+)
Example: PHP regular expression automatically matches whether the string is
Sometimes it is necessary to upload some large files. The old High server is nginx + php, both of which need to be configured.NginxAt the beginning, the old master only configured PHP and always reported an error every time a large file was
DedeCMS Error: Tag disabled: "php" more ...! You just need to simply remove php from the template engine by disabling the tag in the background of the website-system-basic system parameters-other options, as shown in the following figure.Of course,
Configuration file The code is as follows:Copy code /Www/wdlinx/nginx-1.2.8/xxxx.com. conf # Replace the default localhost block The code is as follows:Copy code Location ~ . Php ($ | /){Fastcgi_pass 127.0.0.1: 9000;Fastcgi_index index. php;
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