Open Notepad, write the following program, Save as hello.php:
php Test
$lang _name= "php5";
echo "Welcome to use". $lang _name;
Print "Here uses $lang_name printing text ";
printf ("This is a display style similar to C language ");
/
Common PHP Regular expressions and grammatical annotations: a regular expression that matches a Chinese character: [U4e00-u9fa5] annotation: Match Chinese is really a headache, with this expression is good to do match Double-byte characters
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
The example of this article describes the method by which the PHP associative array implementation deletes elements based on element values. Share to everyone for your reference. Specifically as follows:
?
1 2 3 4 5 6 7
"green",
This article mainly introduces the dynamic call function in PHP method, the example analyzes the PHP dynamic function realization principle and the concrete realization step, needs the friend may refer to under
In PHP, you can pass a function name
If multiple interfaces have an identical method name and are not inherited, PHP is not allowed
The following example:
php; " >
Interface a{
Public function x ();
}
Interface b{
Public function x ();
}
Class C implements a,b{
Public
The Provides a number of interfaces in PHP to implement some very specific features, such as when you want to use an object as an array, just implement the Arrayaccess interface, and when you want to be able to use an object in a foreach, just
The example in this article tells a PHP method for parsing an array of string permutations. Share to everyone for your reference. Specifically as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21-22
"; Print_r
This article is an example of the selection of the King of PHP Monkey solution. Share to everyone for your reference. The specific analysis is as follows:
Problem Description:
A group of monkeys in a circle, press 1,2,...,n sequentially numbered.
This article mainly introduces the Diffie–hellman-Herman Key Exchange (Diffie–hellman) algorithm principle and PHP implementation version, the need for friends can refer to the
Diffie–hellman-Herman (Diffie–hellman) is an algorithm that allows both
This tutorial provides a few PHP tutorials to remove a space in a string a variety of methods Oh, using the PHP function, Str_replace,trim, regular and so on to replace the space of the string effective method
A function with PHP itself
?
Class useful{
/*
* Common function class
* Author: More than a rookie
* Contact Email: KINGERQ at MSN DOT com
* Date Created: 2005-07-18
* Source: Http://blog.csdn.net/kingerq
*/
/*
* Function: Format numbers, output in standard money
Using Smarty to do the template processing class is currently the choice of most PHP sites, because it is powerful, and ADODB with very good, handled is handy. But whether it is smarty, or ADODB, because the function is powerful, class library
Main control Program upfile.php?#####################################################################Project Name:test#Author: lanf#Home page:http://lanf.yeah.net#E-mail:imbusy@263.net#Time: 2001. 9####################################################
Regular expressions for string processing, form verification, and other occasions, practical and efficient. Some commonly used expressions are collected here to prepare for a rainy-future.
a regular expression that matches a Chinese
A function to obtain image information comprehensively getimageinfo (), the function is very good ah! Oh
function Getimageinfo ($img) {//$img for absolute path of image file$img _info = getimagesize ($img);Switch ($img _info[2]) {Case 1:$imgtype = "
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