Introduction to PHP Small Knowledge _php Foundation

Source: Internet
Author: User
1. Download an integrated environment software, that is, others put all the chaos of seven or eight in a piece, made software, this is the SG type, I think beginners with this good point;
2. Each download installation. Php.zend.apache; This method is the most chaotic, and it is not clear yet.

I have IIS installed on the machine, which is just a PHP and Zend. Now you can run both PHP and ASP on the server.

PHP is embedded in HTML and is run as follows:

<?php
$a = "Hello";
$b = "PHP";
echo $a. $b;
?>

Description
Define a variable with the $ variable name, such as the $a on the $b, the reference to this variable also use the $ variable name to reference;
After each statement, add '; ' Indicates the end of the letter;
Output with the Echo output content;
$a, $b, the '. ' The number is used to connect two strings.

The results of the above program are:

Hello, php!.

To output PHP information:

<?php
Phpinfo ();
?>


The IF statement in PHP:

<?php
$a = 10;
$b = 1;
if ($a = = $b) {
echo "A=b";
}
?>
The output results are:

A=b

MD5 password function, the people who have done the web know MD5, this in PHP is just a function, call on OK:

<?php
$a = "PHP";
$b =md5 ($a);
Echo $b;
?>

The output results are:

e1bfd762321e409cee4ac0b6e841963c

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.