• This is the 28th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

The first section

Create a pinyin folder in your name and unzip the Apache server zip package

Conf is a configuration file

Hadoc (the root of the site)

Localhost (local login)

In the second quarter

Code format



      code? >
Copy the code

Basic common symbols

Echo: output

Variables start with $

The decimal is a floating point

Non-0 is true and 0 is false (everything is true except 0)

Empty strings are also false

Double quotes parse variables

Single quotes are direct output and do not parse variables

Delimiter <<<(name custom)

<<<std

It’s no different than double quotation marks, but you have to put it in top

std;

\ Escape character (backslash)

Unset destroys variables

(integer) converts to an integer without changing the original value

Settype changes the original value

. Equivalent to js’s +, string concatenator

In the third quarter

Operators and loops

Leap year: divisible by 4 but not by 100

Ampersand or and are both true

| | or or have a true is true

Xor is similar to and not commonly used

! No, true and false reversed

== Equal operands return true

=== equal and of the same data type

@ Forbid error reporting

Ternary operator

(a>b)?” True value: false value

Rand (1,100) Random number from 1 to 100

Just like the if statement in JS

if() {echo trueOutput}else{

echoOutput}Copy the code

Js switch as well

$day Gets the time

switch($day) {case 1:

echo "On Monday";

break;   // Get out of the loop to save time

case 2:echo "Tuesday"

default:

echo ""

}
Copy the code

The while loop

while() {}Copy the code

The do while loop


do{}while(a)Copy the code

At least one cycle

  • I don’t know how many times I’m going to loop while
  • If you know the number of cycles, use for

for($i=1;$i< =10; ${+ +)echo "This is the $th loop.";

}
Copy the code

The realization idea of multiplication table; Outer loop control row, inner control column

The following control loop statement jumps out

Break the loop

Continue Exits the loop

The last

Knowledge record learning, big guy do not spray

If it is helpful to you, I hope to give you a 👍 comment/collection/three even!

Bloggers are honest and answer questions for free ❤