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

正文內(nèi)容

php動態(tài)網(wǎng)頁制作—計算機(論文)-閱讀頁

2024-12-26 12:48本頁面
  

【正文】 庫 ,同時有手冊。某些函數(shù)可能 需要最新的 GMP 庫 These functions have been added in PHP Note:Most GMP functions accept GMP number arguments,defined as resource ,most of these functions will also accept numeric and string arguments,given that it is possible to convert the latter to a number. Also,if there is a faster function that can operate on integer arguments,it would be used instead of the slower function when the supplied arguments are is done transparently,SO the bottom line is that you can use`integers in every function that expects GMP also the gmp_init()function. 注意 :大多數(shù) GMP 函數(shù)接受下面資源定義的 GMP 數(shù)值參數(shù) ,當然 ,大多數(shù)函數(shù)也接受數(shù)字和字符串參數(shù) ,但是會被轉(zhuǎn)化為數(shù)字。這是當然的 ,所以你可以在需要 GMP 數(shù)字的地方用整數(shù)參數(shù)。這時 ,用留言 版的功能 ,可讓使用者留下到此一游 ,或者是一些和網(wǎng)站的互動訊息。當然 ,要如何打造一個屬于自己 網(wǎng)站的留言版 ,就端賴網(wǎng)站的性質(zhì)以及 Web 網(wǎng)站開發(fā)人員的巧思了。供使用者可以一次看 到多筆留言的資料。范例中的資料庫 (database)名稱為 WWW,連線的使用者帳號為 user3密碼為 iam3849。 CREATE TABLE guestbook ( serial varchar2(255) not null, ref varchar2(255) null, id char(8) not null, alias varchar2(32) not null, ip varchar2(1024) null, msgdate date not null, varchar2(1024) null, msg varchar2(2021) not null, flag char(1) default 1, primary key(serial) )。在這兒先留下欄位 ,讓需要的讀者們實習了。 之 后 還 要 在 編 譯 PHP 時加一=/home/oracle/product/ 的選項 ,當然改成其它的路徑也沒關(guān)系 ,只要該路徑真的是 Mysql 的路徑即可。 下面的程式是將使用者的留言資訊加到 guestbook 留言資料表中。這種設定可以防止不當發(fā)言 ,卻又不會讓留言功能只有少數(shù)人使用。 putenv(NLS_LANG=)。 putenv(LD_LIBRARY_PATH=/home/oracle/product/)。 putenv(ORA_NLS32=/home/oracle/product/)。 $cursor=ora_open($handle)。 $serial=md5(uniqid(rand()))。 $id=$PHP_AUTH_USER。 $msg=base64_encode($msg)。 $query=INSERT into guestbook(serial, ref, id, alias, ip, msgdate, , msg, flag) values(39。, 39。, 39。, 39。, 39。, sysdate, 39。, 39。, 39。)。 ora_exec($cursor)。 ora_logoff($handle)。 exit。 ? table border=0 cellpadding=2 width=395 tr td nowrapfont color=004080代號小名 /font/td td width=20%input type=text name=alias size=8/td td nowrapfont color=004080電子郵件 /font/td td width=50%input type=text name= size=18/td /tr tr td nowrapvalign=topfont color=004080內(nèi)容 /font/td td width=80% colspan=3textarea rows=5 name=msg cols=33/textarea/td /tr tr td width=100% colspan=4 align=center input type=submit value=送出留言 input type=reset value=擦掉留言 /td /tr /table /form /body /html ?php } ? 上面的程式在執(zhí)行時,先檢查變數(shù) alias 和 msg 是否有資料,若無資料則送出填寫留言的表格到使用者端,供使用者填寫留言。 程式大概分成五部份 1.. 設定 Oracle 需要的環(huán)境變數(shù) 2.. 連上 Oracle 資料庫 3.. 整理資料,送入 Oracle 中 4.. 結(jié)束與 Oracle 的連線 5.. 結(jié)束程式,顯示最新的留言資料 在設定 Oracle 環(huán)境的部份,用 PHP 的函式 putenv(),可設定作業(yè)系統(tǒng)層的環(huán)境變數(shù)。 之后就使用 Oracle 函式庫的功能 : ora_logon() 等等。利用這個函式庫,可以很輕易的操作 Oracle 資料庫。 $ref=。 $ip=$REMOTE_ADDR。 $flag=1。$serial39。$ref39。$id39。$alias39。$ip39。$39。$msg39。$flag39。 $serial 變數(shù)為獨一無二的字串,程式先亂數(shù)產(chǎn)生獨特的字串,再用 md5 編碼,將字串弄亂,形成類似雜湊處理后的無意義字串。 $ref 變數(shù)目前是無效的。 至于使用者寫的字串,為了防止資料庫或處理時的復雜性甘脆將它用 BASE64 編碼。值得注意的是使用 BASE64 編碼,會讓字串膨脹大約 1/3,若資料庫的儲存空間有限,可能就不適合用這個方法了,話又說回來,現(xiàn)在硬碟便宜,隨便就是十幾 GB 以 上,應該不會考慮資料庫空間有限的問題才對。 ora_parse($cursor, $query) or die。 ora_close($cursor)。 要執(zhí)行 Oracle 的 SQL 指令前,要先經(jīng)過 parse 的動作。),可以不讓使用者看到錯誤訊息。 Header(Location: ./)。 這二行讓瀏覽器重導到 。 之后來看看留言的內(nèi)容顯 示程式。 charset=gb2312 equiv=ContentType title留言版 /title /head body bgcolor=ffffff ?php // 留言顯示程式 // Author: Wilson Peng // Copyright (C) 2021 $WebmasterIPArray = ay( , // 管理人員甲的機器 IP // 管理人員乙的機器 IP )。 for ($i=0。 $i++) { if ($REMOTE_ADDR == $WebmasterIPArray[$i]) $WebmasterIP=true。 putenv(NLS_LANG=)。 putenv(LD_LIBRARY_PATH=/home/oracle/product/)。 putenv(ORA_NLS32=/home/oracle/product/)。 $cursor=ora_open($handle)。 $query=SELECT serial, ref, id, alias, ip, TO_CHAR(msgdate, 39。), , msg FROM guestbook where flag=39。 order by msgdate desc。 ora_exec($cursor)。 while(ora_fetch($cursor)) { $guestbook[$i][0] = ora_getcolumn($cursor,0)。 $guestbook[$i][2] = ora_getcolumn($cursor,2)。 $gu estbook[$i][4] = ora_getcolumn($cursor,4)。 $guestbook[$i][6] = ora_getcolumn($cursor,6)。 $i++。 ora_logoff($handle)。 if ($QUERY_STRING!=) $page = $QUERY_STRING。 } $i=count($guestbook)。 // 每頁二十筆 $start = $page * $msgnum。 if ($end $i) $end=$i。 $pagestr=。 $pagestr=$pagestr.[第 。 $i$totalpage。 } else $pagestr = $pagestr.($i+1). 。 if ($page($totalpage1)) $pagestr=$pagestr. a href=?.($page+1).下頁 /a 。 echo p.$pagestr.hrp\n。 $i$end。 echo p\nfont color=e06060.$guestbook[$i][5]./font 。 echo strong.$guestbook[$i][3]./strong。 echo br\n。 echo font size=1 color=c0c0c0from: .$guestbook[$i][4]./fontp\n。 $msg=nl2br($msg)。 echo p\n。 echo $pagestr。 程式分成四部份 1.. 初始化 2.. 取資料庫中的資料 3.. 計算要顯示的頁數(shù) 4.. 送出資料 這個程式在 BIGLOBE 上有實作,由于這是一間 ISP 公司,因此在設定時限定撥 接或?qū)>€的會員才能看到,進入前要輸入帳號及密碼。為了保護留言者的隱私,留言以馬賽克處理。 $WebmasterIP=false。 $iCount($WebmasterIPArray)。 } // 之后初始化 Oracle 程式略 顯示程式和留言程式的初始化部份都差不多,但顯示程式多加了一個功能,設 定Webmaster 的電腦。 $handle=ora_logon(user38WWW,iam3849) or die。 ora_mitoff($handle)。yyyy/mm/dd hh:mi:ss39。139。 ora_parse($cursor, $query) or die。 $i=0。 $guestbook[$i][1] = ora_getcolumn($cursor,1)。 $guestbook[$i][3] = ora_getcolumn($cursor,3)。 $guestbook[$i][5] = ora_getcolumn($cursor,5)。 $guestbook[$i][7] = ora_getcolumn($cursor,7)。 } ora_close($cursor)。 在初始化后,就可以連上 Oracle 資料庫,將留言的資料取出放在 $guestbook陣列中。 if ($QUERY_STRING!=) { $page = $QUERY_STRING。 } 這一段程式判斷是要顯示第幾頁,內(nèi)定值是顯示第一頁。之后的數(shù)行程式,都是用來處理顯示的頁數(shù)及筆數(shù)的資料。 // 每頁二十筆 要改變每頁的顯示筆數(shù),可以改 $msgnum 變數(shù)。 for ($i=$start。 $i++) { echo phrp\n。 if ($guestbook[$i][6]!=) echo a href=mailto:.$guestbook[$i][6].。 if ($guestbook[$i][6]!=) echo /a。 if ($WebmasterIP) echo a hre
點擊復制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1