Manual Tower Build PHP development Environment install PHP C:\apps\php installing Apache C:\apps\apache1.Preparation of Apache preparation C: \APPS\APACHE\CONF\HTTPD.conf documentroot"C:/apps/www"//designated working directory, www for self-created healthDirectoryIndex index.php index.html//Join: LoadModule php5_module "C:\apps\PHP\php5apache2_2.dll"Join:P Hpinidir "C:\apps\PHP"Join: Apptype application/x-httpd-php.PHP Lookup<directory "C:/apps/apache/htdocs" >instead<directory "C:/apps/www" >re-starting Apache2.php Compounding C:\apps\php PHP. ini.dist rename PHP.INI in PHP.INI Lookup: PHP_GD2.the DLL removes the preceding annotation symbol; Php_mysql.the DLL removes the preceding annotation symbol; In C: \apps\php\ext,c:\apps\php under Copy php_gd2. Dll,php_mysql.dll,libmysql.dll C:\Windows\System32 below3.Test in C: Create index under/APPS/WWW.php File Input: <?PHPPhpinfo() ?>IE: http://localhost/index.phpZend Studio Integrated Environment installation.PHP with the following mixed HTML div css phpMySQLJS jquery Ajax1.Standard delimiter<?php?PHP Code? >2.Short Mark<?PHP Code? >3.ASP Style<%PHP Code%>4.Script<script language= "PHP" >PHP Code</script>PHP delimiter can be written anywhere on the page PHP case-sensitive PHP with a semicolon-terminated PHP Comment: write in the delimiter line comment://xxxxMulti-line Comments:/*XXXX*/PHP Variables:: Information stored in memory with a name,variables vary with program execution$ variable Name=value variable name rule:$ startthe second digit has meaning with a letter or an underscore variable name,after the second word, the first letter of the word is capitalized$userName $telInfoPricePrint Variables: <?PHPEcho $var;Echo30;?>pre-defined variables:data transfer between pages$_get:passing data via HTTP GET method$_post: Passing data via HTTP GET method$_request=$_get+$_post$_files: Pass data session via HTTP upload file:$_session: Store data on the server$_cookie: Client saves data$_server: System Environment information PHP data type base data type (scalar type) stringstringIntegral typeintegerfloating Point TypefloatFabric TypeBooleanCompound Type Array:ArrayObject:Ob_ject Special Types:Resource Type:resouce Null value:Null no value string"":The double quote code executes': The code will not execute,normal character output escape character:normal character converted to control \ r \ n \ \f control converted to normal character"--->\ "'--->\ ' <--->\< int: integer: decimal, hexadecimal octal floating-point$var= 1.2 Boolean type:$var=true$var=false when comparing true in order to false to 0 when printing true to 1, false to empty when printing:$var=null var: null value$var 1: The value is NULL, the declared variable is null unset ($m):$m is emptyVar_dump ($x): Return variable type data type conversion: PHP: String integer Type: Array object: Ob_ject resource type: resouce null: null No Value PHP weak variable: <?php$a= "123"$b= 10; $c=$a+$b; Echo$c; $aa=true; $BB= 1; Echo$aa+$BB; $CC=false; $DD= 1; Echo$CC+$DD; $BL=""; $num= 1; Echo$BL+$num; $num 1=3$str= "3e+2"; $num=$num 1+$str; Var_dump ($num); $str= "20"$num 2= 5; $num 3=$str+$num 2; Var_dump ($num 3); $str= "20.1"$num 2= 5; $num 3=$str+$num 2; Var_dump ($num 3);? > Implicit conversions: Weakly variable embodiment 1. Convert to Boolean 1---->true false The following will change to False 0/0.0--->false string or"0"----->false Empty array/null---->false 2. Convert to numeric True-->1 false-->0 string with E-e conversion dot string is a numeric string that will be converted to an integer or float Point Type 3. Convert to String true------>"1"false-------->"0"int 123-->"123"Float 3.14---->"3.14"null-------->""array-------->"Array"Object-------->"Oject"Resources-------->"Resource #Serial Number "Variable Display conversions:intfloatboolstring Array Object $str= "234234"; $str 1= (data type)$str;
PHP environment Tajan and data type conversion