freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

phpmysql課堂匯總學習-wenkub

2023-04-07 00:33:16 本頁面
 

【正文】 echo 直接訪問類屬性輸出.br。 $thissex = $xb。 echo 姓名:.$thisname.br。 ?四、__get()函數(shù)和__set()函數(shù)__get():當讀取屬性時,自動被調用__set():當設置屬性時,自動被調用?php class student { public $id。 echo 直接訪問類屬性輸出.br。 $thisname =$xm。 //輸出學生信息 function getinfo() {echo 學號:.$thisid.br。 $stu3 = new student(1003,李四,男)。 } //類的析構函數(shù),對象銷毀時被自動調用 function __destruct() {echo 學生對象.$thisname.被銷毀!.br。 //類的構造函數(shù),創(chuàng)建時被自動調用 function __construct($xh,$xm,$xb) {$thisid = $xh。 $stugetinfo()。 $stugetinfo()。 $thisname =$xm。 } //輸出學生信息 function getinfo() {echo 學號:.$thisid.br。 var $sex。$stugetinfo()。$stusetinfo(1001,張三,男)。 echo 姓名:.$thisname.br。 //設置學生信息 function setinfo($xh,$xm,$xb) { $thisid=$xh。?三,類的定義與對象的使用分別編寫。$stugetinfo()。 echo 姓名:.$thisname.br。 //設置學生信息 function setinfo($xh,$xm,$xb) { $thisid=$xh。 echo 性別:.$thissex.br。 $thisname=$xm。第六課 php的類與對象一,類的定義?phpclass student{ var $id。echo A .$color.$fruit.br。? 六 文件包含 可以用include ,require,require_once ?php$color = green 。 $a++。one()。 }echo 從1到100之間的整數(shù)和是:.fun(1,100).br。?phpfunction fun($a,$b){ for($i=$a,$sum=0。$i=2。} echo 數(shù)組的和是:.$sum.br。 $sum=0。 echo 是.$sum.br。 $sum =0。 echo $sum. 這是for循環(huán)求的和.br。 echo $sum. 這是dowhile循環(huán)求的和.br。$sum = 0。 while($i=100) {$sum = $sum+$i。break。break。break。break。amp。 if($num1$num2amp。 $num1 = $_GET[num1]。c=5/9*(f32)一 選擇語句 從頁面輸入三個數(shù)值,在頁面顯示最大的值。二、安裝php,需要修改apache的配置文件conf\,在 文件末尾處添加教材p82下邊三行代碼(apache CGI方式安裝),保 存重新啟動apache。3,安裝mysql數(shù)據(jù)庫,解壓,運行,當前root密碼為root,驗證 mysql是否安裝成功,輸入密碼,運行show databases。 PHP部分第一課 搭建靜態(tài)動態(tài)web服務器一、 搭建靜態(tài)web服務器 需要安裝IIS(internet information service)或者安裝 apache控制面板 管理工具 Internet信息服務可以在瀏覽器地址欄 敲入 localhost ,,放到C:\Inetpub\root 進入iis,在“默認網(wǎng)站”點擊右鍵,選“屬性”,在“文檔” ,再前移, 查找本機的ip:右下角“本地連接”“屬性”tcp/ip,機房ip范圍:, 通過ip瀏覽其他的網(wǎng)站。4,安裝php,運行,安裝類型IISCGI,瀏覽器地址 欄輸入://localhost/,如果運行成功,安裝成功5,安裝phpmyadmin,可以管理mysql數(shù)據(jù)庫,刪除C:\Inetpub\root 里的phpmyadmin文件夾,解壓,把解壓后的文件夾命名為phpmyadmin, 復制到C:\Inetpub\root, 瀏覽器地址欄輸入://localhost/phpmyadmin, 輸入用戶名root以及密碼,可以管理mysql數(shù)據(jù)庫作業(yè): 教材p35,第1題,設計包含html表單的網(wǎng)頁,網(wǎng)頁寫上自己名字,進行設計, ,復制到C:\Inetpub\root,發(fā)布到本地web服務器上,其他用戶 通過ip能夠訪問。三、安裝mysql四,安裝phpmyadmin第三課 頁面之間數(shù)據(jù)的傳遞一,使用dreamweave創(chuàng)建一個php頁面(),,復制到C:\Inetpub\root, 打開瀏覽器,地址欄輸入://localhost/,運行。form action= method=get數(shù)值一:input name=num1 type=text /br /數(shù)值二:input name=num2 type=text /br /數(shù)值三:input name=num3 type=text /br /input type = submit value=提交 //form?php echo 數(shù)值一是:.$_GET[num1].br。 $num2 = $_GET[num2]。amp。$num2$num3) echo $num2.br。 case Tue: echo 今天是星期二。 case Thu: echo 今天是星期四。 case Sat: echo 今天是星期六。 }?三,用while ,do—while,for實現(xiàn)求1到100的和,輸出到頁面上。 $i++。 do{ $sum = $sum + $i。 for($i=1,$sum=0。?四 求任意兩個數(shù)之間的整數(shù)之和。 for($i=$a。 ?第五課 數(shù)組與函數(shù)作業(yè): 一,定義一個數(shù)組$a,$a[0]到$a[4]分別賦值為100,200,300,400,500,使用循環(huán)求和,輸出求和結果。 $i=0。? 二,使用二維數(shù)組保存學生信息,在頁面輸出信息。$i++){echo $stu[$i][id]. .$stu[$i][name]. 。$i=$b。? 四,函數(shù)和變量作用域?phpfunction one(){ //global $a。echo a=.$a.br。}test()。$fruit = apple。 ?作業(yè):一,教材p35,第1題,設計包含html表單的網(wǎng)頁,網(wǎng)頁寫上自己名字,進行設計, ,復制到C:\Inetpub\root,發(fā)布到本地web服務器上,其他用戶 通過ip能夠訪問。 var $name。 $thissex=$xb。 }}?二,對象的使用?phpclass student{ var $id。 $thisname=$xm。 echo 性別:.$thissex.br。$stuname = 李四。1,?phpclass student{ var $id。 $thisname=$xm。 echo 性別:.$thissex.br。$stugetinfo()。?第七課 類的函數(shù)與訪問控制一 構造函數(shù) __construct() 對象創(chuàng)建時自動被調用,主要對屬性值賦值。 //設置學生信息 function setinfo($xh,$xm,$xb) {$thisid = $xh。 echo 姓名:.$thisname.br。 $thissex = $xb。 $stusetinfo(1001,張三,男)。?二,析構函數(shù) __destruct() 對象銷毀時自動被調到?php class student { var $id。 $thisname =$xm。 } } $stu1 = new student(1001,王五,男)。 ?三、類的屬性的訪問控制public:公有屬性,類的內部和外部都可以進行訪問private:私有屬性,類的內部可以進行訪問,類的外部不能進行訪問protected:保護屬性,類的內部可以進行訪問,類的外部不能訪問, 但是該類的子類可以進行訪問var 默認是public屬性一般情況屬性為private?php class student { public $id。 echo 姓名:.$thisname.br。 $thissex = $xb。 echo 學號:.$stuid.br。 private $name。 echo 性別:.$thissex.br。 } //當讀取屬性時,函數(shù)自動被調用 function __get($propertyname) {return $this$propertyname。 //調用__get函數(shù) echo 學號:.$stuid.br。 $stuname=王英。 var $name。 $thissex =$xb。 } //類的構造函數(shù) function __construct($xh,$xm,$xb) {$thisid = $xh。 } } $stu = new student(1002,王五,男)。 $stuname = 李四。 var $name。 $thissex=$xb。 }}class student_A extends student{//新屬性 private $dep。} function setspe($spe) {$thisspe=$spe。$stusetdep(軟件學院)。$stugetspe()。 var $sex。 } //輸出學生信息 function getinfo() { echo 學號:.$thisid.br。 private $spe。 $thissex=$xb。 echo 學號:.$thisid.br。 echo 專業(yè):.$thisspe.br。?三 ,對象的克隆可以創(chuàng)建一個與原對象相當屬性和方法的對象,自動調用__clone()函數(shù)。 //設置學生信息 function __construct($xh,$xm,$xb) { $thisid=$xh。 echo 姓名:.$thisname.br。//由stu1克隆出stu1,自動調用__clone函數(shù)$stu2 = clone $stu1。?phpclass student{ private $xm。 echo 學生.$thisxm.被創(chuàng)建!目前共有.self::$counter.人br。}}echo 目前總人數(shù):.student::getcounter().br。$stu1 = null。 ?第九課 類的抽象與接口作業(yè): 定義一個圓類circle,屬性有圓心橫坐標x,圓心縱坐標y,半徑r。$circle2setinfo(3,3,3)。echo $circle2circumference().br。 var $xb。} //抽象方法,沒有被實現(xiàn)的方法 abstract function getinfo()。 }}//繼承抽象類class student_B extends student{ function getinfo() {echo No:.$thisxh.br。$stu1getinfo()。接口可以被繼承,接口里的方法要被實現(xiàn)。
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1