【正文】
改和使用。Apache是最通用的網(wǎng)絡(luò)服務(wù)器;Mysql是帶有基于網(wǎng)絡(luò)管理附加工具的關(guān)系數(shù)據(jù)庫;PHP是流行的對象腳本語言,它包含了多數(shù)其它語言的優(yōu)秀特征來使得它的網(wǎng)絡(luò)開發(fā)更加有效[9]。功能設(shè)計上本系統(tǒng)主要包括七大功能:個人用戶管理功能、論壇內(nèi)容展示功能、會員管理功能、分區(qū)管理功能、版塊管理功能、文章管理功能和回帖管理功能。用戶信息表(bbs_user)主要是存儲系統(tǒng)用戶的相關(guān)信息以及使用權(quán)限,只用在這個表中存在的用戶并且有一定權(quán)限才能登錄到系統(tǒng)的后臺業(yè)務(wù)界面,表中沒有權(quán)限的用戶只能查看本論壇系統(tǒng)的前臺展示部分,展示部分也可以登錄的,論壇系統(tǒng)最重要的就是用戶,所以用戶基本信息表的設(shè)計十分重要,用戶基本信息表的設(shè)計如表31所示。內(nèi)存緩存采用Memcache。 $sH=$arr[1]。: $funName=png。 $newName=$prefix.$oldName。 添加會員功能本小節(jié)主要介紹的是會員管理中的添加會員功能,以及這些功能是調(diào)用的那部分函數(shù)。REMOTE_ADDR39。 }else{ Yii::app()usersetFlash(39。=$usermodel))。,array(39。,array(39。39。isadmin=:isadmin39。 $pageapplyLimit($criteria)。uid=:uid39。signed39。 $thumbsavePath($upfile,50,50,$dir,39。,39。刪除分區(qū)時,如果該分區(qū)下面有板塊,則要先完成刪除該分區(qū)下的板塊。)。(1)功能描述分頁顯示所有分區(qū)。=$pager))。,39。 }以下代碼是刪除分區(qū)代碼,根據(jù)分區(qū)id查詢出該分區(qū)下是否包含版塊,如果沒有版塊則調(diào)用deletebypk方法刪除該分區(qū)。 }else{ Yii::app()usersetFlash(39。(2)程序?qū)崿F(xiàn)點擊添加版塊按鈕,在彈出的對話框里,在同意分區(qū)下,輸入不同的版塊名稱可以在前臺顯示出剛剛添加的版塊,如果數(shù)據(jù)庫中已有該分區(qū)下的這個版塊,則添加版塊失敗,詳細(xì)代碼如下。info39。(1)功能描述分頁顯示所有版塊。$cateatotal = $articlemodelcount(cid=:cid,array(:cid=$cateid))。foreach($partmodel as $part){$parts[$partid] = $partname。)。} 如果該板塊下的文章已經(jīng)為空,則通過id調(diào)用deletebypk刪除版塊。,39。 $cdb = new CDbCriteria()。 刪除文章 (1)功能描述點擊刪除圖標(biāo),刪除該文章,對于文章下評論數(shù)不為零的要先刪除該文章下的所有評論。 } $thisredirect(array(39。 $pagerapplyLimit($cdb)。id39。前臺內(nèi)容和后臺管理是校園購物系統(tǒng)的重要方面?;贚AMP的網(wǎng)絡(luò)購物系統(tǒng)的設(shè)計與實現(xiàn)Make use of PHP to realize and carry out the advanced procedure on the Web本網(wǎng)站實現(xiàn)了網(wǎng)上商品訂購和商品展示,以及對網(wǎng)站會員和訂單業(yè)務(wù)的管理,使得這個網(wǎng)站的運作更具整體性。ment/list39。圖417 數(shù)據(jù)瀏覽界面(2)程序?qū)崿F(xiàn)此功能是使用sql語句刪除,首先實例化mon對對象,然后直接根據(jù)id使用deletebypk方法刪除該id對應(yīng)下的回帖。 $cdb = new CDbCriteria()。info39。=$arts,39。第二種方式就是分離Model模型,上述代碼采用的就是分離Model模型方式。刪除成功39。catemodel39。=$datapid))){ Yii::app()usersetFlash(39。$data = $catemodelfindByPk($_GET[39。$cates = $catemodelfindAll($cdb)。=$parts))。 $thisredirect(array(39。))。info39。partmod39。],array(39。,array(39。=$partmodel))。 if($partmodelvalidate()){ if($partmodelinsert()){ Yii::app()usersetFlash(39。,array(39。id39。)。sex39。$id = $_GET[39。)。圖47 會員編輯界面圖48 會員分頁顯示界面(2)程序?qū)崿F(xiàn)我們主要利用Page組件實現(xiàn)分頁,首先實例化User對象和criterria容器,然后統(tǒng)計總條數(shù),實例化分頁類,設(shè)置每頁顯示多少條,進行l(wèi)imit截取其代碼如下。 echo $formerror($model,39。)) ? /div div class=form_row ?php echo $formlabelEx($model,39。)) ? /div div class=form_row ?php echo $formlabelEx($model,39。 $usermodelrepass = 39。info39。]。例如點擊文章的緩存原理文章,系統(tǒng)界面如圖44所示。 $toY=($toH$trueH)/2。: $funName=gif。 $white=imagecolorallocate($i, 255, 255, 255)。為此,制定一個數(shù)據(jù)庫對象的前綴BBS。文章管理功能:管理員對前臺用戶發(fā)表的文章進行管理,對不符合論壇要求的相關(guān)內(nèi)容進行刪除。像百度貼吧未登錄發(fā)貼要輸入驗證碼大概是防止大規(guī)模匿名回帖的發(fā)生目前,不少網(wǎng)站為了防止用戶利用機器人自動注冊、登錄、灌水,都采用了驗證碼技術(shù)。 系統(tǒng)分析論壇管理系統(tǒng)最重要的就是前臺瀏覽論壇和后臺管理論壇數(shù)據(jù)兩部分,本系統(tǒng)對兩部分的架構(gòu)都做了詳細(xì)的設(shè)計,前臺主要包括用戶個人管理和論壇內(nèi)容展示兩個部分,而后臺主要包括會員管理,分區(qū)管理,板塊管理,文章管理和回帖管理五個部分。 SphinxSphinx是一個基于SQL的全文檢索引擎,可以結(jié)合MySQL,PostgreSQL做全文搜索,它可以提供比數(shù)據(jù)庫本身更專業(yè)的搜索功能,使得應(yīng)用程序更容易實現(xiàn)專業(yè)化的全文檢索。通過一整套編輯、調(diào)試、分析、優(yōu)化和數(shù)據(jù)庫工具,Zend Studio 加速開發(fā)周期,并簡化復(fù)雜的應(yīng)用方案。系統(tǒng)的設(shè)計以方便未來業(yè)務(wù)的擴展和系統(tǒng)擴充為目標(biāo),系統(tǒng)要求能夠方便的升級,充分保護系統(tǒng)的投資。國外對BBS的直接研究很少,間接的研究主要集中在對網(wǎng)絡(luò)社會、虛擬社區(qū)方面。而如今的BBS系統(tǒng)功能更豐富,允許用戶之間分享工具軟件,技術(shù)文檔等資源。s BBS forum system features richer, allowing users to share between the tools and software, technical documentation and other resources. How to design the stability of the BBS system, each developer must consider the problem, a successful BBS system can greatly improve the bearing of this forum website click rate, in order to make a forum system play a greater role, the enterprise user added to the products, services, and other content are discussed, the development of enterprises has a good role in promoting.This paper introduces the background and significance of the research and the development of the domestic and foreign, and introduces the technology of the subject.. Combined with the business users basic requirements, detailed analysis and research, identify seven modules: individual user management function, the content of the Forum display function, member management and maintenance functions, partition management and maintenance functions, sector management and maintenance functions, article management function and replies management function, including the main function of the system. This paper expounds the realization of the main function modules in detail..This system uses Studio Zend integrated development environment, and uses the Yii framework technology based on MVC mode to develop. Use Sphinx fulltext search engine to achieve the article search. System foreground data using file caching and Memcache caching technology can greatly improve the user experience. Database using the Oracle Corp Mysql database, using SQLyog to achieve the database management and operation. In the premise of the object oriented programming technology, the concrete realization of the system is pleted.. The system has solved the pressure of the website under the large amount of visit, and has good assistant for the development of the enterprise.Keyword: Forum management system。 密級: 基于PHP框架的社區(qū)論壇管理系統(tǒng)的設(shè)計與實現(xiàn)Research Php BBS Forum Management System Based on Yii Framework摘 要社區(qū)論壇管理系統(tǒng)是互聯(lián)網(wǎng)上的一種電子信息服務(wù)系統(tǒng)。 fulltext search。BBS論壇系統(tǒng)突破了地域和時間的限制,實現(xiàn)了全球性資源共享,有助于人們學(xué)習(xí),工作,生活,同時提高了人們的交流信息、思想和解決問題的能力。如針對網(wǎng)絡(luò)社會中的人際關(guān)系、行為方式、價值觀念和社會結(jié)構(gòu)等,對虛擬社區(qū)的自身特征及虛擬社區(qū)中的社會問題等進行廣泛研究。論壇系統(tǒng)的研究目標(biāo)是前臺對所有的數(shù)據(jù)進行展示,以及利用網(wǎng)絡(luò)文本編輯器實現(xiàn)發(fā)帖和回帖。Zend Studio支持PHP語法加亮顯示,支持語法自動填充功能,支持書簽功能,支持語法自動縮排和代碼復(fù)制功能,內(nèi)置一個強大的PHP代碼調(diào)試工具,支持本地和遠(yuǎn)程兩種調(diào)試模式,支持多種高級調(diào)試功能[6]。Sphinx特別為一些腳本語言設(shè)計搜索API接口,如PHP,Python,Perl,Ruby等,同時為MySQL也設(shè)計了一個存儲引擎插件[8]。從硬件上講,計算機硬件的速度現(xiàn)在已經(jīng)不是問題,大容量高速度的硬盤十分普遍了,同時網(wǎng)絡(luò)速度的提高,這些為系統(tǒng)的運行打下了堅實的基礎(chǔ)。 系統(tǒng)通用性本系統(tǒng)代碼編寫嚴(yán)格符合在Linux下要求,因此在Linux下也能正常運行,通常系統(tǒng)最后發(fā)布都要發(fā)布在Linux系統(tǒng)下[12]?;靥芾砉δ埽汗芾韱T對前臺游客以及會員回帖進行管理,對不符合論壇要求的回復(fù)進行刪除。數(shù)據(jù)庫設(shè)計符合范式。 imagefill($i,0,0,$white)。 break。 imagecopyresized($i,$s,$toX,$toY,0,0,$trueW,$trueH,$sW,$sH)。圖 42 系統(tǒng)首頁部分截圖圖43 系統(tǒng)登陸界面圖