When you include a file with include or Requice, the file path is preceded by a dirname (__file__). For example: Existing a.php, b.php, c.php, D.PHP4 files, they relate to:
B.php (same level as root directory)Root directory/a.phpRoot
This article mainly introduced the PHP micro-credit Development two-dimensional code generation class, this article uses the micro-letter interface to realize the two-dimensional code generation, and directly to the production example code, needs
The example in this article describes how jquery gets the value of multiple checkbox asynchronously submitted to PHP. Share to everyone for your reference. The implementation methods are as follows:
HTML code: ?
1 2 3 4 5 6 7 8
'
This article mainly introduced the PHP verification credit card number is correct function, this article directly gives the realization code, needs the friend may refer to under
You can use the following PHP function to verify that a card number is
This article describes a method that PHP randomly divides strings into arrays of different lengths. Share to everyone for your reference. The specific analysis is as follows:
This uses PHP to randomly segment the string within a specified length,
Creating an array stops saying the array () function
The array can be extracted using the list ().
To test an array element, you can use Is_array ()
Takes a parameter, passes in the variable, if the variable is an array, returns true if it is not
Open a command prompt cmd.exe
E:wampbinphpphp5.2.6>php.exe a.php 11
11 is the pass parameter
Get
if ($argv [1]) {
$_get[' id ']= $argv [1];
}
echo $id =$_get[id]+1;
You can change the a.php to your file name, note the directory structure
I
This article mainly introduces the PHP super awesome infinite Pole classification spanning tree method, this article uses the reference in PHP to realize the tree generation method skillfully, compared to the recursive method high-end many, needs
/*php Regular extraction of arbitrary attributes in an IMG tag of a picture * * $str = "php to extract or change any attribute ' in the img tag of the picture;
1, take the whole picture codePreg_match ('/]*?srcs*=s* (' | ') (.*?) 1[^>]*?/?s*>/i ',
This article illustrates the basic operation and usage of memcache in PHP. Share to everyone for your reference. Have a small partner in need to study it quickly.
PHP Memcache Basic Operation Example
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
This article mainly introduces PHP performance analysis tool xhprof installation tutorial, this article gives detailed installation steps and configuration methods as well as the use of examples, the need for friends can refer to the
Hprof is a PHP
This article mainly introduced the correct PHP matching UTF-8 Chinese Regular expression, this article compares gives two different regular expressions, the need friend may refer to the next
I used to use it all the time.
The code is as follows:
The example in this article describes the way PHP automatically gets keywords. Share to everyone for your reference.
The implementation methods are as follows:
The code is as follows: $mincipin =5;//minimum Word frequency
$minlen =4;//keyword
This article describes object-oriented programming in PHP (Oop,object oriented programming). I will show you how to pass
Use some OOP concepts and PHP techniques to reduce coding and improve quality. Good luck!
The concept of object-oriented
Four
Q: When I compile PHP and Apache together, there seems to be a problem. It always says that the Httpd.h file cannot be found, but in fact the file exists. Why?
A: You need to let the PHP configuration/installation script know your Apache
This article mainly introduces the use of PHP code to add watermark to the image of the relevant information, the need for friends can refer to the
First find a picture, renamed to Face.jpeg, create watermark.php:
?
1 2 3 4 5 6 7 8 9 1
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