After following, you can keep track of his dynamic information in a timely manner
Courses in the relevant section:PHP Beginner's First PHP Program
php 的基礎(chǔ)語法 <?php 代碼塊; ?> 注釋 單行注釋 //注釋內(nèi)容 多行注釋 /*注釋內(nèi)容*/
2016-12-010個贊
Courses in the relevant section:Variables for beginners to PHP
變量: 變量以美元符號$開頭。如$name,$age。 美元符號$后面的第一個字符不可以是數(shù)字,只能是下劃線_或者字母。如$1_1這樣的變量是錯誤的。 除了下劃線_外,變量不允許出現(xiàn)任何空格或標(biāo)點符號。也就是說變量名只能包含:a-z、A-Z、0-9 以及下劃線_。 PHP變量名是區(qū)分大小寫的。如$name與$Name是兩個不同的變量 變量的作用域 global 用于函數(shù)內(nèi)訪問全局變量 static 靜態(tài)變量僅在局部函數(shù)域中存在,但當(dāng)程序執(zhí)行離開此作用域時,其值并不丟失
2016-12-010個贊
Courses in the relevant section:PHP Beginner's Introduction to Output Functions
php 輸出 echo 只支持基本類型,布爾型除外,echo true的時候顯示1,echo false 時為空。echo不可以輸出數(shù)組類型 print() 只能輸出一個字符串,不支持逗號分隔多個顯示變量的語法。print能輸出數(shù)組類型的數(shù)據(jù) print_r()可以打印出復(fù)雜類型變量的值(如數(shù)組,對象) printf() 輸出格式化的字符串 var_dump 同 print_r() 函數(shù)一樣,var_dump() 函數(shù)也可以用于打印數(shù)組的數(shù)據(jù)及結(jié)構(gòu)。不過 var_dump() 函數(shù)功能比 print_r() 更強大,可以同時打印多個變量且給出變量的類型信息
2016-12-010個贊
Courses in the relevant section:Data types for beginners to PHP
整型 整數(shù)必須至少有一個數(shù)字 (0-9) 整數(shù)不能包含逗號或空格 整數(shù)是沒有小數(shù)點的 整數(shù)可以是正數(shù)或負(fù)數(shù)
2016-12-010個贊
Courses in the relevant section:Constants for beginners to PHP
difine() 函數(shù) bool define ( string $name , mixed $value [, bool $case_insensitive = false ] ) name : 必選參數(shù),常量名稱,即標(biāo)志符 value: 必選參數(shù),常量的值 case_insensitive可選參數(shù),如果設(shè)置為 TRUE,該常量則大小寫不敏感。默認(rèn)是大小寫敏感的
2016-12-010個贊
Courses in the relevant section:Strings for newbies to PHP
字符串中的并置運算符 " . " strlen()函數(shù) 取字符串長度 strpos()函數(shù) 在字符串內(nèi)查找一個字符或一段指定的文本
2016-12-010個贊
Courses in the relevant section:PHP operators for beginners
<?php header("Content-type: text/html; charset=utf-8");//設(shè)置編碼 三元運算符 x ? y : z x為真,執(zhí)行y 否則執(zhí)行z
2016-12-010個贊
Courses in the relevant section:Conditional statements for beginners to PHP
判斷語句 if(條件){ 執(zhí)行代碼; } if(條件){ //滿足條件; 執(zhí)行代碼; }else{ //不滿足條件; 執(zhí)行代碼 }
2016-12-010個贊
Courses in the relevant section:Loop statement for beginners to PHP
for($i=0;$i<10;$i++){ 執(zhí)行代碼 }
2016-12-020個贊
Courses in the relevant section:Arrays for Beginners to PHP
帶有數(shù)字ID鍵的數(shù)組----數(shù)值數(shù)組 帶有指定的鍵的數(shù)組,每個鍵關(guān)聯(lián)一個值-------關(guān)聯(lián)數(shù)組 包含一個或多個數(shù)組的數(shù)組--------多維數(shù)組
2016-12-020個贊
Courses in the relevant section:PHP Beginner's Introduction to Superglobal Variables
$GLOBALS 一個包含了全部變量的全局組合數(shù)組。變量的名字就是數(shù)組的鍵 $_SERVER 是一個包含了諸如頭信息(header)、路徑(path)、以及腳本位置(script locations)等等信息的 數(shù)組, 這個數(shù)組中的項目由 Web 服務(wù)器創(chuàng)建 $_REQUEST $_REQUEST 用于收集 HTML 表單提交的數(shù)據(jù) $_POST與$_GET 應(yīng)用于收集表單數(shù)據(jù)
2016-12-020個贊
Courses in the relevant section:Functions for beginners to PHP
function name(){ 代碼塊 } name(); //調(diào)用函數(shù)
2016-12-020個贊
Courses in the relevant section:PHP Beginner's Guide to Magic Variables
__LINE__ 文件中的當(dāng)前行號 __FILE__ 文件的完整路徑和文件名 __DIR__ 返回被包括的文件所在的目錄
2016-12-020個贊
Courses in the relevant section:PHP Beginner's Introduction to Object Orientation
定義了一件事物的抽象特點。類的定義包含了數(shù)據(jù)的形式以及對數(shù)據(jù)的操作 定義在類內(nèi)部的變量。該變量的值對外是不可見的,但是可以通過成員函數(shù)訪問,在類被實例化為對象后,該變量即可稱為對象的屬性
2016-12-020個贊
Courses in the relevant section:Form processing for beginners in PHP
表單提交時,我們大部分情況下都會使用post來獲取表單的信息
2016-12-020個贊