PHP basics I was going to talk about DivCSS today and found that I am not very familiar with Div, so I will try to use the package: wamp later and install it all the way. Programming Software: sublime, or do not use DW, a powerful prompt-carrying tool. After wamp is installed, run wamp and create a test. php file under the www directory.
PHP basics I was going to talk about DivCSS today and found that I am not very familiar with Div, so I will try to use the package: wamp later and install it all the way. Programming Software: sublime, or do not use DW, a powerful prompt-carrying tool. After wamp is installed, run wamp and create a test. php file under the www directory.
PHP Basics
Today I want to talk about Div + CSS. I found that I am not very familiar with Div, so I will talk about it later.
Directly use the package: wamp, and install it all the way down.
Programming Software: sublime, or do not use DW, a powerful prompt-carrying tool.
After wamp is installed, run wamp, create a test. php file under the www directory, and open it with sublime
Write the Code:
Open 127.0.0.1/test. php in a browser and a webpage appears,
This webpage includes PHP compilation and extension information, PHP version, server information and environment, and so on. This indicates that the environment is successfully installed.
PHP basic syntax
PHP is the script language used for the server.
Let's see what it can do:
1. Collect form data
2. generate dynamic web pages
3. string processing
4. Dynamic Output Image
5. process the file system on the server
6. Compile the web pages supported by the database
7. session tracking control
8. Process XML files
9. support using a large number of network protocols
10. Other operations on the server
Let's talk about PHP and HTML code mixing.
Here is an example:
<? Php echo "this is the title"?>
While (get data from database ){
}
How can I modify this code so that it can be executed? The following code
Pack them up?>
For PHP annotations, // **/can be used. # annotations are rarely used.
Variable Declaration
PHP is a weak language. If it is not defined first, you can use it when and when. In addition, it does not divide variables into many types like the C language. When you define it, what type is assigned, and what type is it
For example:
There is also an array type, which is not as strict as other languages, and the data in it must be of the same type. The PHP array is actually an ordered graph, and its subscript and data are the relationship of key => value.
Example:
"12312", 12 => 123333, 13 => true); // print the array print_r ($ arrayName); // print the data according to the subscript echo $ arrayName ["name"]; echo $ arrayName [12]; echo $ arrayName [13];?>
Type forced conversion
So much today