PHP learning notes 01PHP integrated installation environment AppServ, built-in apache, mysql, php script parsing tools. Development Tool: ZendStudio. : Www.zendstudio.net. Set workspace to the phpwww directory for debugging. Set the Zend template. Set the code prompt. & Lt ;? Php % & gt; write php code. Single PHP Study Notes 01
AppServ is an Integrated PHP installation environment with built-in apache, mysql, and php script parsing tools.
Development Tool: Zend Studio. : Http://www.zendstudio.net /.
Set the workspace to the php www directory for debugging.
Set the Zend template.
Set the code prompt.
%>
Write php code.
// Single line comment
/**/Multi-line comment
Browser output first
Echo ""; the running speed is slightly faster. echo single quotes are entered directly without conversion.
Print ""; returns an integer.
The variable starts with $ and does not need to be defined.
Data type conversion
Add a type before the variable, which can be forcibly converted, such as (float) $ num
Gettype () get the variable type
Settype () can also be used for type conversion.
Isset () determines whether a variable exists
Unset () destroy variable
Empty () determines whether the variable value is null. it can be string, integer, or array.
Type judgment function:
Is_integer
Is_int
Is_array
Is_null
.....
Data type conversion functions:
Intval ();
Floatval ();
Strval ();
Assign the converted data to the new variable, and settype convert the original variable.
Define () constant definition. the constant name is generally an uppercase letter. Constants cannot be modified.
Access Form variables:
$ _ POST ["name"]
$ _ GET ["name"]
String concatenation '.'