Time of Update: 2016-07-29
info.inc.php主要做些判斷和資訊處理 function update($reginfo) { switch ($reginfo[4]) { case ($reginfo[4]==1): $reginfo[4]="男"; break; default: $reginfo[4]="女"; break; } switch ($reginfo[11]) {
Time of Update: 2016-07-29
只要在convert中指定日期格式的代號就夠了,如: select convert(char(20),getdate(),101) select emp_id,convert(char(20),hire_dt,101) from employee ----------------------------------------------------- 日期格式 代號 -------------------- ----------- 04/05/2000 10
Time of Update: 2016-07-29
reguse.php使用者註冊與登入頁面 if ($action==dl&&$uname) { $uinfo=$uname."|".$upass; setcookie("FlyFoxNet",$uinfo,time()+3600); } ?> 使用者註冊 include "linkfox.inc.php"; include "info.inc.php"; include "reguse.inc.php"; function dlokey($user) //登入成功顯示 {
Time of Update: 2016-07-29
三 首頁新聞發布,讓你更新更輕鬆(下) -----上一講裡,我們已經實現了首頁新聞發布的準系統。在這一講裡,我們再給它添磚加瓦,使它的功能更為強大。(一個好用的軟體,其實也就是準系統加上一批附屬功能,這些附屬功能主要也是圖個方便而已,呵呵) -----首先,我們再明確一下我們想獲得什麼方便。我們不希望幾十天以前的東西我們忘了刪除,結果還作為新聞發布在首頁(很丟臉的哦^&^)。如果我們在基本實現中嵌入一段代碼,比如說用filectime($filename),那麼在UNIX下,我們就可以得到從19
Time of Update: 2016-07-29
reguse.inc.php處理註冊使用者時的資訊 function regok($mess,$reginfo) //記錄成功後輸出使用者資訊 { echo ""; echo "".$mess.""; echo "ID號:".$reginfo[13].""; echo "使用者:".$reginfo[0].""; echo "密碼:".$reginfo[1].""; echo "首頁:".$reginfo[9].""; echo "郵箱:".$reginfo[8].""; echo
Time of Update: 2016-07-29
註冊部分: 註冊步驟1: class/register_step1.php 班級通訊錄-註冊第一步 include "config.php"; if ($Submit){ $answers1=trim($answers1); $answers2=trim($answers2); if (!($answers1==$answer1)||!($answers2==$answer2)){ echo "回答錯誤!返回"; exit; } echo "回答正確,進入第二步。"
Time of Update: 2016-07-29
access中可以將文本中的資料輕鬆匯入表中,mysql中用起來沒那麼方便,其實起來也很簡單。 首先將資料記錄按行處理好用特定的字元分開如:“,” 記錄形如: aaa,bbb,ccc,ddd,eee fff,ggg,hhh,iii,jjj,kkk 就行,建立loaddate.php $hostname="localhost"; $username="yourname"; $password="yourpwd"; $dbname="yourdb";
Time of Update: 2016-07-29
三 首頁新聞發布,讓你更新更輕鬆(中) 上次我們做了一個檔案頭(至於檔案尾,請大家自己做,假設為tail.php),一個函數的模組,現在,我們來一個準系統的實現,也就是動態發布啦 include("makestr.php"; include("head.php"); $newspath="/announce/"; //以文字檔存放的新聞檔案的目錄 $newsfile=array();//準備新聞數組 $hd=dir($newspath); //目錄控制代碼
Time of Update: 2016-07-29
班級管理部分: 首頁:superadmin.php include ("class/config.php"); if ($superadmin){ //如果已經進行管理員登陸,進行密碼驗證 if (!($supername==$supervisor)||!($superpass==$superpsw)){ echo "密碼錯誤"; exit; }else{ //用session記錄管理員登陸 session_start(); //
Time of Update: 2016-07-29
班級成員留言簿管理: class/notebook/delnote.php session_start(); if(!session_is_registered("superlogin"))//檢查是否註冊 { echo "請重新進行管理員登陸"; exit; } include ("../config.php"); if($del==1){ //判斷是否要刪除 mysql_query("delete from notebook where time='$time'",$db);
Time of Update: 2016-07-29
By Vikram Vaswani Melonfire November 07, 2000 以下是代碼清單: -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ---------------------
Time of Update: 2016-07-29
Untitled Document include "linkfox.inc.php"; include "info.inc.php"; ?> $query="select * from foxbbs where"; $req=mysql_query($query); if ($req) { $bbsmes=mysql_fetch_array($req); $djnum=$bbsmes["djnum"]+1; $query="update foxbbs set
Time of Update: 2016-07-29
留言簿部分: 班級成員留言簿: 顯示留言:class/notebook/index.php session_start(); // 開始session if(!session_is_registered("userregister")||($userregister==""))//檢查是否註冊,如userregister未註冊或session為空白值,重新註冊. { echo "請重新註冊"; exit; } ?> 留言簿 include ("../config.php");
Time of Update: 2016-07-29
這裡和大家交流一下架設個人網站的經驗。不妥之處,敬請指正! 一 編輯調試環境 win98本地編輯調試,爽不爽?先下一個Omnihttpd Proffesinal V2.06 ,裝上就有PHP4beta3可以用了。如果你較懂HTML,推薦用EditPlus,相當好哦!否則只好用DreamWeaver先了。還要連資料庫?幸好MySQL還有For WIN32的版本。 二 先來一個計數器
Time of Update: 2016-07-29
三 首頁新聞發布,讓你更新更輕鬆(上) --------每次在首頁中增加一條訊息,加兩句話,就得整個頁面都上傳一遍,真是不值!於是象藍風這種懶漢就想了一個一勞永逸的辦法,真正的動態即時,遠端管理編輯,自動維護功能。也可以用來做虛擬社區的公告板。(如果改吧改吧,就可以把你的新聞中心的新聞在首頁自動產生提要了,呵呵。)這麼多功能,大家多多原諒,嘿嘿。
Time of Update: 2016-07-29
其實寫這幾篇代碼的時間不過近三天而已,事前即沒有經過詳細思考和計劃(可以說一點計劃都沒有)那天想起做個論壇試試,於是就做起來了,而我也是才接觸了將近一個月時間的PHP,以前也沒真正寫過程式之類的東東,在寫這段代碼的兩天半時間裡,有好幾次遇到困難,都想放棄,但是我還是寫出來了,而且沒想到居然能用,所以中間可能有很多隱患也說不清,雖然說是可以用了。
Time of Update: 2016-07-29
顯示主題內容頁面。 狐網論壇 include "linkfox.inc.php"; include "info.inc.php"; ?> $query="select * from foxbbs where"; //這個ID是從上一頁面也就是FOXBBS.PHP裡傳過來的。 $req=mysql_query($query); if ($req) { $bbsmes=mysql_fetch_array($req); $djnum=$bbsmes["djnum"]+1;
Time of Update: 2016-07-29
主介面,也就是顯示主題列表的這頁。 //foxbbs.php 功能:顯示論壇的主題 狐網論壇 include "linkfox.inc.php"; include "info.inc.php"; ?> $tem=$HTTP_COOKIE_VARS[FlyFoxNet]; //這裡取COOKIE裡的資訊 $temp=explode("|",$tem); //因為使用者名稱和密碼是用"|"分隔並記錄在COOKIE裡的
Time of Update: 2016-07-29
這個例子建了一個串連,用ODBC開啟Access的資料庫NorthWind(安裝Access時帶的示範)。在執行了SQL語句後,返回了RecordSet對象。例子顯示了前三個欄位: $dbc = new COM("ADODB.Connection"); $dbc->Provider = "MSDASQL"; $dbc->Open("nwind"); $rs = $dbc->Execute("select * from products"); $i = 0; while (!$rs->
Time of Update: 2016-07-29
POST.PHP發布主題的頁面,發布的資訊提交到OKEY.PHP中去處理。 論壇發帖 include "linkfox.inc.php"; include "info.inc.php"; ?> $tem=$HTTP_COOKIE_VARS[FlyFoxNet]; //取COOKIE資訊 $temp=explode("|",$tem); $cookiem=$temp[0]; $useinfo=cuser($cookiem,$action); if