Home  >  Article  >  Backend Development  >  Basic knowledge about php

Basic knowledge about php

WBOY
WBOYOriginal
2016-07-29 08:37:301063browse

1. Download an integrated environment software, that is, others put all the mess together and make it into software. This is SG style. I think it is better for beginners;
2. Each one Download and install .php.zend.apache; this method is the most confusing and I haven’t figured it out yet.
Since IIS is installed on the machine, I just installed php and zend. Now I can run php on the server at the same time. and asp.
php is embedded and run in html. As follows:
$a="Hello";
$b="php";
echo $a.$b;
?>
Note:
Use $variable name to define a variable, such as $a $b above. When referencing this variable, you must also use $variable name to reference it;
After each statement, add a ';' sign to indicate the end;
When outputting Use echo to output the content;
$a.$b; The '.' sign in this is used to connect two strings.
The running result of the above program is:
Hello, PHP!
Output the php information :
phpinfo();
?>
if statement in php:
$a=10;
$b=1;
if($a==$b){
              echo "a=b";
    }
?>
The output result is:
a=b
MD5 encryption function, anyone who has done the web knows md5, this is just a function in php, just call it :
$a="php";
$b=md5($a);
echo $b;
?>
The output result is:
e1bfd762321e409cee4ac0b6e841963c

The above introduces some basic knowledge about PHP, including some aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn