計(jì)算機(jī)外文翻譯---基于php和mysql的網(wǎng)站設(shè)計(jì)和實(shí)現(xiàn)_第1頁(yè)
已閱讀1頁(yè),還剩8頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p><b>  中文2270字</b></p><p>  譯文二:基于PHP和MYSQL的網(wǎng)站設(shè)計(jì)和實(shí)現(xiàn)</p><p><b>  摘要</b></p><p>  PHP和MYSQL因?yàn)槠涿赓M(fèi)以及開放源碼已經(jīng)成為主要的web開發(fā)工具。作者就基于PHP和MYSQL開發(fā)網(wǎng)站進(jìn)行開發(fā)環(huán)境問題的討論。</

2、p><p><b>  關(guān)鍵詞</b></p><p>  PHP;MYSQL;發(fā)展和實(shí)現(xiàn)。</p><p><b>  1.介紹</b></p><p>  隨著網(wǎng)絡(luò)技術(shù)的發(fā)展,不可避免的帶動(dòng)各種企業(yè)傳統(tǒng)營(yíng)銷與網(wǎng)絡(luò)營(yíng)銷的增長(zhǎng)。其中最有效的方法是為他們的公司建立一個(gè)網(wǎng)站。目前網(wǎng)站開發(fā)的主流平臺(tái)包括LAM

3、P(Linux操作系統(tǒng),Apache網(wǎng)絡(luò)服務(wù)器,MYSQL數(shù)據(jù)庫(kù),PHP編程語(yǔ)言),J2EE和.NET商業(yè)軟件。因?yàn)镻HP和MYSQL是免費(fèi)的,開源等等,他們是為專業(yè)的IT人士開發(fā)的。從網(wǎng)站流量的角度來看,超過70%的網(wǎng)站流量是有LAMP提供的,這是最流行的網(wǎng)站開發(fā)平臺(tái)。</p><p>  在本文中,我們基于PHP和MYSQL設(shè)計(jì)了一個(gè)網(wǎng)站。本文的組織如下。第一節(jié)分析開發(fā)環(huán)境。第二節(jié)中,我們提出基于PHP的開發(fā)

4、模型。然后,第四節(jié)是案例研究。在第五節(jié)我們做出結(jié)論。</p><p><b>  2.發(fā)展環(huán)境分析</b></p><p><b>  A.開發(fā)語(yǔ)言的選擇</b></p><p>  ASP.NET,PHP&JSP是三個(gè)主流的網(wǎng)站開發(fā)語(yǔ)言,它們分別具有各自的優(yōu)點(diǎn)和缺點(diǎn),它們之間的比較見表1。</p>

5、<p>  這個(gè)項(xiàng)目我們采用PHP作為開發(fā)語(yǔ)言的原因如下:</p><p>  免費(fèi)的。這個(gè)項(xiàng)目小,不需要使用支付開發(fā)平臺(tái)如ASP.NET and JSP。</p><p>  強(qiáng)大的支持。中小型網(wǎng)站,甚至一些大型網(wǎng)站如百度,新浪都把PHP作為開發(fā)語(yǔ)言,可以有組與解決在編程上的問題。</p><p>  良好的可移植性。盡管起初只能在Linux和Apach

6、e Web服務(wù)器環(huán)境中開發(fā),現(xiàn)在已經(jīng)可以移植到任何的操作系統(tǒng),并兼容標(biāo)準(zhǔn)的Web服務(wù)器軟件。</p><p>  簡(jiǎn)單的語(yǔ)法。PHP和C編程語(yǔ)言有許多的相似之處,所以會(huì)C的程序員很容易的就能使用PHP程序語(yǔ)言。</p><p>  發(fā)展快速。因?yàn)槠湓创a是開放的,所以PHP能迅速的發(fā)展。</p><p><b>  B.構(gòu)建開發(fā)環(huán)境</b>&l

7、t;/p><p>  目前有很多基于PHP的開發(fā)平臺(tái)。通常大多數(shù)開發(fā)人員喜歡LAMP開發(fā)環(huán)境。那些有一定開發(fā)經(jīng)驗(yàn)的可以通過選擇相關(guān)的服務(wù)器,數(shù)據(jù)庫(kù)管理系統(tǒng)和操作系統(tǒng)設(shè)置他們的開發(fā)平臺(tái)。有一些PHP IDE(集成開發(fā)環(huán)境)如AMPSERV,XMAPP,PHPSTUDY,APPSERV,市場(chǎng)開發(fā)人員通過PHP開發(fā)網(wǎng)站。</p><p>  目前主要的PHP IDE是Zend Studio,它包括了

8、PHP的開發(fā)組件,在調(diào)試,分析和優(yōu)化時(shí)減少了開發(fā)時(shí)間和簡(jiǎn)化了復(fù)雜的應(yīng)用程序。Zend Studio不僅具有高測(cè)量代碼,語(yǔ)法和書簽,而且它的嵌入式調(diào)試器適合本地和遠(yuǎn)程調(diào)試模式。它有很多高級(jí)的調(diào)試功能,如變量跟蹤,單步操作,斷點(diǎn),功能調(diào)用等等。此外,它也非常穩(wěn)定,在中國(guó)支持其最新的版本。</p><p>  C.指出構(gòu)建開發(fā)環(huán)境</p><p>  那些自己不熟悉開發(fā)環(huán)境并不設(shè)置的,可能會(huì)引起

9、各種版本之間的沖突,而且很難解決這個(gè)復(fù)雜的配置問題。</p><p>  PHP語(yǔ)言版本。在開發(fā)之前,你必須確保PHP語(yǔ)言和服務(wù)器版本之間的一致性?,F(xiàn)在主要有兩個(gè)版本的PHP(PHP4和PHP5)。不同的版本有不同的會(huì)話,異常處理,變量范圍,數(shù)據(jù)類型等等。</p><p>  服務(wù)器問題。PHP在windows平臺(tái)上的程序編輯將安排在apache服務(wù)器上。如果是安排在IIS上,它會(huì)導(dǎo)致一些

10、不兼容的和一些更新的問題,比如可寫的權(quán)利是建立在上傳文檔的。如果安排在apache服務(wù)器上則沒有這些問題。</p><p>  數(shù)據(jù)庫(kù)問題。PHP使用的數(shù)據(jù)庫(kù)有MYSQL,ORACLE等等。MYSQL因?yàn)槠溟_源免費(fèi)和有效率受到大多數(shù)開發(fā)人員的喜愛。</p><p>  MYSQL對(duì)于中小型應(yīng)用系統(tǒng)來說是個(gè)完美的軟件。除了ANSI SQL,它還支持多種平臺(tái)。在Unix和Linix,MYSQL

11、也支持多線程。MYSQL成為了中小級(jí)別PHP網(wǎng)站的第一選擇,因?yàn)槠溟_源,它提供了一系列的支持如讀寫訪問。</p><p>  3.基于PHP的開發(fā)模型</p><p>  PHP成為中小型企業(yè)網(wǎng)站主要的開發(fā)語(yǔ)言,因?yàn)樗敲赓M(fèi)開放源碼等。開發(fā)步驟如下:</p><p><b>  A.需求分析</b></p><p>  

12、一個(gè)網(wǎng)站項(xiàng)目有各種各樣的要求。這些要求往往源于公司自己的需求,其中大部分是客戶的實(shí)際需求。項(xiàng)目領(lǐng)導(dǎo)人在最大程度上理解用戶的需求決定是否開發(fā)網(wǎng)站。因此用戶需求文檔的形式可以很明顯的轉(zhuǎn)化為開發(fā)人員的項(xiàng)目。這是項(xiàng)目開發(fā)的主要問題。</p><p>  出了基本的用戶需求,如下有一些問題需要注意:</p><p>  應(yīng)該確認(rèn)需求文檔的方式。</p><p>  通知需求方

13、在可行性和價(jià)格要求方面進(jìn)行有效的分析和討論。</p><p><b>  B.功能模塊設(shè)計(jì)</b></p><p>  需求報(bào)告將根據(jù)高內(nèi)聚低耦合的原則組織一些模塊和相關(guān)經(jīng)驗(yàn)的網(wǎng)站開發(fā)人員。</p><p>  C.數(shù)據(jù)庫(kù)的設(shè)計(jì)和實(shí)現(xiàn)</p><p>  它包含了需求分析,概念設(shè)計(jì),邏輯設(shè)計(jì),物理設(shè)計(jì),系統(tǒng)實(shí)現(xiàn),操作和維

14、護(hù)。一下問題在數(shù)據(jù)庫(kù)設(shè)計(jì)和實(shí)現(xiàn)中應(yīng)該注意:</p><p>  數(shù)據(jù)庫(kù)安全:數(shù)據(jù)庫(kù)是網(wǎng)站的核心,數(shù)據(jù)的安全是非常重要的。損壞和丟失或非法復(fù)制的數(shù)據(jù)會(huì)引起很多麻煩。而且錯(cuò)誤很難恢復(fù)。MYSQL安全措施如下:</p><p>  賬號(hào)安全:每個(gè)賬戶的MYSQL是有用戶名,密碼以及位置,包括合理的權(quán)利和安全檢查。合理的權(quán)利要求有不同權(quán)利不同用戶和相同用戶有不同權(quán)利為不同的數(shù)據(jù)庫(kù)或數(shù)據(jù)表。在MYS

15、QL上有三種不同的安全檢查:登記,確認(rèn),授權(quán),訪問控制。</p><p>  存儲(chǔ)數(shù)據(jù)加密:對(duì)于有大量信息的應(yīng)用程序,你可以加密很小的一部分,如用戶密碼。這些密碼不應(yīng)存儲(chǔ)在明文的加密形式,但在數(shù)據(jù)庫(kù)中,一般來說,包括MYSQL是通過在大多數(shù)數(shù)據(jù)庫(kù)管理系統(tǒng)中的敏感數(shù)據(jù)加密算法。</p><p>  數(shù)據(jù)庫(kù)的字符集和編碼:用于web服務(wù)器的默認(rèn)代碼,比如apache安裝的軟件,不是utf-8.

16、我們通常瀏覽網(wǎng)頁(yè)輸入數(shù)據(jù)表中的編碼是utf-8,但是在中國(guó)phpmyadmin會(huì)變成亂碼。解決方案是在數(shù)據(jù)庫(kù)鏈接被分配的MYSQL的默認(rèn)代碼轉(zhuǎn)化為utf-8或數(shù)據(jù)代碼(utf-8)。</p><p><b>  D.功能模塊實(shí)現(xiàn)</b></p><p>  代碼,詳細(xì)的注釋和標(biāo)準(zhǔn)化的寫作是實(shí)現(xiàn)功能模塊的要求。目標(biāo)是可重用性,可靠性高,效率高,安全等等。</p&g

17、t;<p><b>  4.案例研究</b></p><p>  作者開發(fā)的咨詢網(wǎng)站是基于PHP的(域名地址是http://www,zhuoqichina.com)。該網(wǎng)站主要包括九個(gè)模塊,如檢索模塊、專家咨詢模塊、維護(hù)模塊的問題,成員交互模塊、問題討論模塊、文件瀏覽模塊、注冊(cè)模塊、幫助模塊和其他輔助模塊。</p><p>  每個(gè)模塊包含大量的功能模塊

18、。例如,在該網(wǎng)站前面的模塊主要是檢索模塊,輸入檢測(cè)模塊,匹配搜索模塊和顯示模塊,等返回前面的代碼在執(zhí)行檢索模塊。</p><p>  具體的過程是,用戶輸入相關(guān)的檢索信息到搜索框。那么信息將被發(fā)送到最終的處理頁(yè)面后按檢索按鈕。輸入的信息是通過調(diào)用代碼檢查結(jié)束。如果這是有效的,結(jié)果匹配成功,將顯示匹配后的信息和數(shù)據(jù)庫(kù)中的信息。。</p><p><b>  5.結(jié)論</b&g

19、t;</p><p>  PHP和MYSQL已經(jīng)成為主要的web開發(fā)工具,他是免費(fèi)的,開源的,具有高可靠性和可移植性。</p><p><b>  引用</b></p><p>  [1] LAMP. http://baike.baidu.com/view/365086.htm?fr=ala0_1_1. 4(In Chinese). &l

20、t;/p><p>  [2] 郭亮, 高慧.APS和JSP的研究對(duì)比.黑龍江科技. 2007,(17):80(In Chinese).</p><p>  [3] 張志敏. ASP.NET, PHP 和 JSP之間的比較分析 . 科學(xué)愛好者. 2008,(33):132-133(In Chinese).</p><p>  [4] Zend Studio 5

21、.5.1集成開發(fā)環(huán)境系列http://www.zendstudio.net/zend-studio-tutorial/. 2010-5-4(In Chinese)</p><p>  [5] 徐保民. PHP編程基礎(chǔ)和應(yīng)用案例.北京文章電信出版社,2001(In Chinese).</p><p>  [6] 利昂阿特金森. PHP核心編程.北京清華大學(xué)出版社, 2000 (In

22、Chinese).</p><p>  [7] Ashish丹尼爾·威爾弗雷德. PHP 專業(yè)發(fā)展項(xiàng)目案例.北京中國(guó)水利出版社, 2003.(In Chinese).</p><p>  [8] 在phpMyAdmin中utf-8亂碼. http://www.rockdai.com/?p=289. 2010-5-4.(In Chinese).</p><

23、;p>  原文二:Design and Implementation of the Website Based on</p><p>  PHP & MYSQL</p><p><b>  Abstract</b></p><p>  PHP and MYSQL has been the main web development

24、tool for it is free and open source. The authors have discussed the environmental issues in development process based on PHP and MYSQL and the implementation process of the website .</p><p><b>  Keywor

25、ds</b></p><p>  PHP; MYSQL; Development and. Implementation</p><p>  1.INTRODUCTION</p><p>  With the development of Web technology, it is inevitable choice for all kind of co

26、rporate growth to combine traditional marketing with network marketing. The effective method of network marketing is to establish the website which is suitable for their company. At present the website development's

27、mainstream platform includes: LAMP (Linux operating system, Apache network server, MYSQL database, PHP programming language), J2EE and. Net commercial software. Because PHP and MYSQL is free, open sourc</p><p&

28、gt;  In this paper, we designed a website based on PHP and MYSQL. The paper is organized as follows. Section 1 analyzes development environment. In Section 2, we proposed the development model based on PHP. Then case s

29、tudy in Section 4. we make conclusion In Section 5.</p><p>  2.DEVELOPMENT ENVIRONMENT ANALYSIS</p><p>  A.The Choice of Development Language</p><p>  ASP.NET, PHP & JSP are thr

30、ee mainstream languages of the website development, which have their advantages and disadvantages respectively, the comparison between them is shown in Table1.</p><p>  The project takes PHP as the developme

31、nt language, the reason is as follows: </p><p>  ?Free. The project is small, which is no need to use the payment development platform such as ASP.NET and JSP.</p><p>  ?Strong supporting. Mi

32、ddle and small scale websites, even some large-scale websites such as baidu, Sina in China take PHP as the development language, which can contribute to solve the problem during the programming.</p><p>  ?Go

33、od portability. Although it is designed to use in the environment of Linux and Apache Web server system at first, now PHP is already transplanted any operating system and compatible standard Web server software.</p&

34、gt;<p>  ?Simple grammar. PHP has many similarities with the C programming language, so it is easy to program using PHP for the C programmers.</p><p>  ?Rapid development. Because the source code is o

35、pen, PHP will continue to develop rapidly.</p><p>  B.Build Development Environment</p><p>  At present there are many development platform based on PHP. Generally most developers like the devel

36、opment environment LAMP. Those who have certain development experience can set up their development platform by choosing the related server, DBMS, and operating system. There are some PHP IDE(integrated development envir

37、onment) such as AMPSERV, WAMP, XMAPP, APPSERV, PHPSTUDY in the market for the developers develop the website by using PHP.</p><p>  At present the main PHP IDE is Zend Studio, which has included developing c

38、omponents for PHP. It reduces the development time and simplifies the complex application plan during edition, debugging, analysis and optimization. The Zend Studio not only has code for high measurement, grammar shrinki

39、ng automatically and bookmark, but also its embedded debugger which fits for local and remote debugging patterns. It is many high debugging functions such as variable tracking, Single-step operation, break</p><

40、;p>  C.Notes in Building the Development Environment</p><p>  Those who are unfamiliar with the development environment do not set it up by himself for it may cause a conflict between various edition, mor

41、eover it is very difficult to solve the complex configuration problem.</p><p>  ?PHP language version. Before development, you must ensure consistence of the edition between PHP language and the server. Now

42、PHP mainly has two editions (PHP4 and PHP5). The different versions have the difference with SESSION, exception handling, the variable range, the data type and so on.</p><p>  ?Server problem. The program wh

43、ich is edited with PHP in the windows platform will be arranged on the apache server. If it is arranged on IIS it leads to some incompatible problems and some update by manual such as writable rights is set up before

44、uploading the document. There are not these problems if it is arranged on the apache server. </p><p>  ?Database problem. DBMS using with PHP has MYSQL, ORACLE and so on. MYSQL is welcomed by most of th

45、e developers for it is open source, free, and efficient. MYSQL is perfect database server software for medium and small application system. Besides standard ANSI SQL, it also supports many platforms. On the Unix/Linu

46、x system, MYSQL also supports the multi-thread. MYSQL becomes the first choice of middle and small level PHP website for it is open source and it provides a series of supports such</p><p>  3.THE DEVELOPMENT

47、 MODEL BASED ON PHP</p><p>  PHP becomes the main development language in the small and medium-sized enterprise website for it is free, open source, etc. The development step is as follows:</p><p&

48、gt;  A.Demand analysis</p><p>  There are various demands for a website project. Those demands often stem from or company oneself needs, most of which is the actual needs of customers. What extent the projec

49、t leaders understand the user's needs has decided whether is success or failure in developing the website. Therefore user's needs in the form of document can clearly be transformed into all project development me

50、mbers, which is the main problem during the project development.</p><p>  Besides basic user's needs, there are some problems as follows are needed to notice:</p><p>  ?The demand should be

51、confirmed by way of the document.</p><p>  ?The feasibility and price of their demands are informed to the demand side after effective analysis and discussion.</p><p>  B.Functional module desi

52、gn</p><p>  The demand report will be organized as some modules according to the principles of high cohesion and low coupling and related experience by the website developers.</p><p>  C.Databa

53、se design and implementation</p><p>  It contains the demand analysis, the concept design, the logical design, the physical design, the system implementation, the operation and the maintenance. The following

54、 problems should be paid attention to during the database design and implementation:</p><p>  Database security [5]: The database is the core of website, in which the data security is very important. The d

55、amage and lose or illegal duplication of data can cause a lot of trouble, moreover the mistake is very difficult to restore. MYSQL security measures are as follows:</p><p>  ?Account security: Each account o

56、f MYSQL is composed of user name, password as well as the position, which includes reasonable rights and security check. The reasonable rights demand that there are different rights for the different account and as

57、identical user there are different rights for different database or data sheet. There are three different security checks in the MYSQL: register confirmation, authorization, access control.</p><p>  ?Stored

58、data encryption [6]: for the massive information in application program, you only want to encrypt a very small part of it, such as user password. These passwords should not store in the form of plaintext but encryptio

59、n in the database. In general, the sensitive data is encrypted by Hash algorithm in most DBMS including MYSQL.</p><p>  The database character set and coding [7]: The default code used in web server softw

60、are installed, like Apache, is not UTF-8. The webpage is normally browsed when we input data into table coded in UTF-8, but Chinese in phpMyAdmin turns into messy code. The solution is that the default code in MYSQL t

61、urned into UTF-8 or the data code (UTF-8) is assigned when the database is connected[8].</p><p>  D.The Functional Module Implementation</p><p>  A few codes, detailed annotation and standardize

62、d writing are demanded during functional module implementation. The goal is high reusability, high reliability, efficiency, high security and so on.</p><p>  4.CASE STUDY</p><p>  The authors

63、developed the consult website (ZhuoQi, domain name address is http://www.zhuoqichina.com/ ) based on PHP. ZhuoQi mainly includes nine modules, such as the retrieval module, the expert consult module, the issue maintenanc

64、e module, the member interaction module, the problem discussion module, the documents browsing module, the registration module, the help module and other auxiliary modules.</p><p>  Each module consists of a

65、 large number of functional modules, for example, retrieval module in the website ZhuoQi mainly consists of the front module, input check module, matching search module, and display return module, etc. The front code in

66、implementing retrieval module.</p><p>  The specific process is that the user input the related retrieval information into the search box, then the information will be sent to the end processing page after t

67、he button “retrieval” is pressed. The information inputted is checked by calling the end code. If which is valid, the results matched successfully will be displayed in the predetermined format after matching between the

68、 information inputted and the information in the database. </p><p>  5.CONCLUSION</p><p>  PHP and MYSQL has been the main web development tool for it is free, open source, high reliability, p

69、ortability.</p><p>  REFERENCES</p><p>  [1] LAMP. http://baike.baidu.com/view/365086.htm?fr=ala0_1_1. 4(In Chinese). </p><p>  [2] Guo Liang, Gao Hui. The research on comparison b

70、etween ASP, and JSP Heilongjiang Science and Technology Information. 2007,(17):80(In Chinese).</p><p>  [3] Zhang Zhimin. Comparative Analysis between ASP.NET, PHP and JSP . Friend of Science Amateurs.

71、 2008,(33):132-133(In Chinese).</p><p>  [4]Zend Studio 5.5.1 Integrated Development Environment Series. http://www.zendstudio.net/zend-studio-tutorial/. 2010-5-4(In Chinese)</p><p>  [5] Xu Bao

72、min. Programming Fundamentals and Applications Examples on PHP. Beijing: Posts and Telecom Press,2001(In Chinese).</p><p>  [6] Leon Atkinson. PHP Core Programming. Beijing: Tsinghua university press, 2000

73、(In Chinese).</p><p>  [7] Ashish Daniel Wilfred. PHP professional development project examples. Beijing: China WaterPower Press, 2003.(In Chinese).</p><p>  [8]UTF8 Chinese Messy

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論