Home  >  Article  >  Backend Development  >  Basic knowledge of PHP_PHP tutorial

Basic knowledge of PHP_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:53:40834browse

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 .Download and install .php.zend.apache separately; this method is the most confusing and I haven’t figured it out yet.

I installed php and zend because Iis is installed on my machine. Now. You can run php and asp at the same time on the server.

php is embedded in html and runs as follows:

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

Explanation:
Define a variable using $ variable name, as shown above $a $b, When referencing this variable, you must also use the $ variable name to quote;
After each statement, add a ';' sign to indicate the end;
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 php information:

phpinfo();
?>


if statement in php:

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

a=b

MD5 encryption function. Anyone who has worked on the web knows md5. This is just a function in php, and the call is OK:

$a="php";
$b=md5($a);
echo $b;
?>

The output result is:

e1bfd762321e409cee4ac0b6e841963c

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318654.htmlTechArticle1. Download an integrated environment software, which means others put all the mess together. Made into software, this one is SG style, I think it is better for beginners; 2. Download and install .php...
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