




免费预览已结束,剩余4页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
西 安 邮 电 大 学毕 业 设 计(外文翻译)题 目: Design and Implementation of the Website Based on PHP & MYSQL 基于PHP和MYSQL的网站设计和实现 学 院: 计算机学院 专 业: 网络工程 班 级: 网络1101 学生姓名: 周从军 导师姓名: 朱辉 职称: 讲师 AbstractPHP and MYSQL has been the main web development 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 . Keywords PHP; MYSQL; Development and Implementation .1. INTRODUCTION With the development of Web technology, it is inevitable choice for all kind of corporate 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 developments 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 source and so on, they are noted for IT professionals. From the perspective of website traffic, more than 70% of website traffic is provided with LAMP, which is most popular platform for developing the website. In this paper, we designed a website based on PHP and MYSQL. The paper is organized as follows. Section 1 make conclusion In Section 5.2. DEVELOPMENT ENVIRONMENT ANALYSIS A. The Choice of Development Language ASP.NET, PHP & JSP are three mainstream languages of the website development, which have their advantages and disadvantages respectively, the comparison between them is shown in Table1. The project takes PHP as the development language, the reason is as follows: Free. The project is small, which is no need to use the payment development platform such as ASP.NET and JSP. Strong supporting. Middle 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. analyzes development environment. In Section 2, we proposed the development model based on PHP. Then case study in Section 4. weGood 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. Simple grammar. PHP has many similarities with the C programming language, so it is easy to program using PHP for the C programmers. Rapid development. Because the source code is open, PHP will continue to develop rapidly. When Zeev Suraski added the object-oriented syntax back in the days of PHP 3, it was added as syntactic sugar for accessing collections. The OO model also had support for inheritance and allowed a class (and object) to aggregate both methods and properties, but not much more. When Zeev and Andi Gutmans rewrote the scripting engine for PHP 4, it was a completely new engine; it ran much faster, was more stable, and boasted more features. However, the OO model first introduced in PHP 3 was barely touched. Although the object model had serious limitations, it was used extensively around the world, often in large PHP applications. This impressive use of the OOP paradigm with PHP 4, despite its weaknesses, led to it being the main focus for the PHP 5 release. So, what were some of the limitations in PHP 3 and 4? The biggest limitation (which led to further limitations) was the fact that the copy semantics of objects were the same as for native types. So, how did this actually affect the PHP developer? When assigning a variable (that points to an object) to another variable, a copy of the object would be created. Not only did this impact performance, but it also usually led to obscure behavior and bugs in PHP 4 applications because many developers thought that both variables would point at the same object, which was not the case. The variables were instead pointing at separate copies of the same object. Changing one would not change the other. For example: class Person var $name; function getName() return $this-name; function setName($name) $this-name = $name; function Person($name) $this-setName($name); function changeName($person, $name) $person-setName($name); $person = new Person(Andi); changeName($person, Stig); print $person-getName(); In PHP 4, this code would print out Andi. The reason is that we pass the object $person to the changeName() function by-value, and thus, $person is copied and changeName() works on a copy of $person. This behavior is not intuitive, as many developers would expect the Java-like behavior. In Java, variables actually hold a handle (or pointer) to the object, and therefore, when it is copied, only the handle (and not the entire object) is duplicated. There were two kinds of users in PHP 4: the ones who were aware of this problem and the ones who were not. The latter would usually not notice this problem and their code was written in away where it did not really matter if the problem existed. Surely some of these people had sleepless nights trying to track down weird bugs that they could not pinpoint. The former group dealt with this problem by always passing and assigning objects by reference. This would prevent the engine from copying their objects, but it would be a headache because the code included numerous & signs. The old object model not only led to the afore-mentioned problems, but also to fundamental problems that prevented implementing some additional feature way where it did not really matter if the problem existed. Surely some of these people had sleepless nights trying to track down weird bugs that they could not pinpoint. The former group dealt with this problem by always passing and assigning objects by reference. This would prevent the engine from copying their objects, but it would be a headache because the code included numerous & signs. The old object model not only led to the afore-mentioned problems, but also to fundamental problems that prevented implementing some additional features on top of the existing object model. In PHP 5, the infrastructure of the object model was rewritten to work with object handles. Unless you explicitly clone an object by using the clone keyword, you never create behind-the-scenes duplicates of your objects. In PHP 5, you dont need a need to pass objects by reference or assign them by reference. Note Passing by reference and assigning by reference are still supported, in case you want to actually change a variables content (whether object or other type). B. Build Development Environment At present there are many development platform based on PHP. Generally most developers like the development 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 environment) such as AMPSERV, WAMP, XMAPP, APPSERV, PHPSTUDY in the market for the developers develop the website by using PHP. At present the main PHP IDE is Zend Studio, which has included developing components 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 shrinking 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, breakpoint, function calling, and so on. Moreover, it is also very stable in supporting Chinese for the latest version. C. Notes in Building the Development Environment Those who are unfamiliar with the development environment do not set it up by himself for it may cause a conflict between various edition, moreover it is very difficult to solve the complex configuration problem. PHP language version. Before development, you must ensure consistence of the edition between PHP language and the server. Now 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. Server problem. The program which 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 uploading the arranged on the apache server document. There are not these problems if it is Database problem. DBMS using with PHP has MYSQL, ORACLE and so on. MYSQL is welcomed by most of the 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/Linux 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 as read-write access.3. THE DEVELOPMENT MODEL BASED ON PHP 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: A. Demand analysis 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 project leaders understand the users needs has decided whether is success or failure in developing the website. Therefore users needs in the form of document can clearly be transformed into all project development members, which is the main problem during the project development. Besides basic users needs, there are some problems as follows are needed to notice: The demand should be confirmed by way of the document. The feasibility and price of their demands are informed to the demand side after effective analysis and discussion. B. Functional module design The demand report will be organized as some modules developers. C. Database design and implementation It contains the demand analysis, the concept design, the logical design, the physical design, the system implementation, the operation and the maintenance. The following problems implementation: should be paid attention to during the database design and according to the principles of high cohesion and low coupling and related experience by the websiteDatabase security 5: The database is the core of website, in which the data security is very important. The damage 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: Account security: Each account of 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 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. Stored 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 encryption in the database. In general, the sensitive including MYSQL. The database character set and coding 7: The default code used in web server software 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. D. The Functional Module Implementation A few codes, detailed annotation and standardized writing during functional module implementation. The reliability, efficiency, high security and so on. 4. CASE STUDY The authors developed the consult website (ZhuoQi, domain name address is / ) based on PHP. ZhuoQi mainly includes nine modules, such as the retrieval module, the expert consult module, the issue maintenance module, the member interaction module, the problem discussion module, the documents browsing module, the registration module, the help module and other auxiliary modules. Each module consists of a large number of functional modules, for example, retrieval module in the website ZhuoQi mainly consists of the front module, input are demanded goal is high reusability, high MYSQL turned into UTF-8 or the data code (UTF-8) is assigned when the database is connected8. data is encrypted by Hash algorithm in most DBMScheck module, matching search module, and display return module, etc. The front code in implementing retrieval module. 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 the 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 information inputted and the information in the database. 5. CONCLUSION PHP and MYSQL has been the main web development source, high reliability, portability. 摘要PHP 和 MYSQL 因为其免费以及开放源码已经成为主要的 web 开发工具。作者 就基于 PHP 和 MYSQL 开发网站进行开发环境问题的讨论。 关键词 PHP;MYSQL;发展和实现。 1. 介绍 随着网络技术的发展, 不可避免的带动各种企业传统营销与网络营销的增长。 其中最有效的方法是为他们的公司建立一个网站。 目前网站开发的主流平台包括 LAMP(Linux 操作系统, Apache 网络服务器, MYSQL 数据库, PHP 编程语言), J2EE 和.NET 商业软件。因为 PHP 和 MYSQL 是免费的,开源等等,他们是为专业的 IT 人士开发的。从网站流量的角度来看,超过 70%的网站流量是有 LAMP 提供的, 这是最流行的网站开发平台。 在本文中,我们基于 PHP 和 MYSQL 设计了一个网站。本文的组织如下。第一 节分析开发环境。第二节中,我们提出基于 PHP 的开发模型。然后,第四节是案 例研究。在第五节我们做出结论。2.发展环境分析 A.开发语言的选择 ASP.NET,PHP&JSP 是三个主流的网站开发语言,它们分别具有各自的优点 和缺点,它们之间的比较见表 1。 这个项目我们采用 PHP 作为开发语言的原因如下: 免费的。这个项目小,不需要使用支付开发平台如 ASP.NET and JSP。 强大的支持。中小型网站,甚至一些大型网站如百度,新浪都把 PHP 作为开 发语言,可以有组与解决在编程上的问题。 良好的可移植性。 尽管起初只能在 Linux 和 Apache Web 服务器环境中开发, 现在已经可以移植到任何的操作系统,并兼容标准的 Web 服务器软件。 简单的语法。PHP 和 C 编程语言有许多的相似之处,所以会 C 的程序员很容 易的就能使用 PHP 程序语言。 发展快速。因为其源代码是开放的,所以 PHP 能迅速的发展。当 Zeev Suraski 在过去的 PHP 3 时期增加面对对象语法的时候,面对对象是作为“访问 集合的语法甜点”增加进去的。当时的面向对象的模型支持继承并允许一个类(和对象)去 聚合方法和属性,但仅限于此。当 Zeev 和 Andi Gutmans 重写 PHP4 的脚本引擎的时候,他 们构造了一个全新的引擎;它运行速度更快,更加稳定,还有许多可以令其自豪的特性。但 是,从 PHP 3 就加入的面向对象的模型却在此次重写中没有涉及。 虽然那时的对象模型有着很多的局限,但是它却在世界范围内被广泛地使用,尤其是 在大型的 PHP 应用中。PHP4 中面对对象编程范例的使用是令人难忘的,虽然它有着不足, 但是却使得其成为 PHP 5 发布的主要焦点。那么,PHP3 和 PHP4 中这些局限是什么呢?最大的限制(导致其他更多的限制)是复制对象的语义实际上是 PHP 复制出了和原来一摸一样的另一个对象。这个结果对于 PHP 开发人员来说意味着什么?当把一个变量(指向一个对象)赋值给另一个变量的时候,PHP 拷贝了那个被指向的对象。 这样的操作不仅会影响性能, 而且还会增加 PHP 应用中的调试难度。 因为许多开发人员会以为这两个变量都指向了同一个对象,事实上并不是这样的。相反,这 连个变量是分别指向一个对象的两个不同的拷贝。如果你更改其中一个,另外一个并不会因 此而改变。 例如: lass Person var $name; function getName() return $this-name; function setName($name) $this-name = $name; function Person($name) $this-setName($name); function changeName($person, $name) $person-setName($name); $person = new Person(Andi); changeName($person, Stig); print $person-getName(); 在 PHP 4 中,上面的代码会打印出“Andi” 。因为我们把 Sperson 对象的值传递给了 changeName()函数,所以 Sperson 被复制了而且 changename()只是处理了 Sperson 的拷 贝。 这种操作并不符合开发者的直觉,因为许多开发者会期待一种类似 java 的 行为。在 java 中,变量的值实际上是对象的句柄(或者是指针) ,所以当它被复制的时候,只是句柄(而 不是整个对象)被拷贝。 在 PHP 4 中有两种使用者:一些人了解这个问题而另一些人不清楚。后者往往没有注 意到这个问题,所以他们编写代码时没有注意问题是否确实存在。显然,后者中的一些人可 能会花一晚上的时间去尝试修正怪异的 Bug,因为他们无法查明原因。以往解决这个问题的 方法是总在传递和赋值上网的时候使用引用。这样能够避免复制对象,但是因为代码中包含 太多的&符号而令人头疼。 老的对象模块不但导致上述的问题,还会导致一些基础问题使你无法使用现有的对象 模块实现更多的特性。 在 PHP5 中,对象模块的底层被重写以便支持对象句柄。除非你用 clone 关键字明确 要克隆一个对象,否则你将永远不会无意识地复制对象。在 PHP5 中,你不需要通过引用来 传递对象或者引用赋值。 注意:PHP 5 还是支持引用传递和赋值,假如你需要真的改变一个变量的内容的话(无论对 象还是其他类型的数据)。B.构建开发环境 目前有很多基于 PHP 的开发平台。 通常大多数开发人员喜欢 LAMP 开发环境。 那些有一定开发经验的可以通过选择相关的服务器, 数据库管理系统和操作系统设 置 他 们 的 开 发 平 台 。 有 一 些 PHP IDE ( 集 成 开 发 环 境 ) 如 AMPSERV,XMAPP,PHPSTUDY,APPSERV,市场开发人员通过 PHP 开发网站。 目前主要的 PHP IDE 是 Zend Studio,它包括了 PHP 的开发组件,在调试, 分析和优化时减少了开发时间和简化了复杂的应用程序。Zend Studio 不仅具有 高测量代码,语法和书签,而且它的嵌入式调试器适合本地和远程调试模式。它 有很多高级的调试功能,如变
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 职场养生保健知识培训课件
- 游戏外包委托开发合同协议书模板范本
- 环保汽车新品发布会
- 解读人力资源行业发展趋势
- 2025年疼痛科慢性疼痛综合评估实验考核试题答案及解析
- 2025年中医科针灸疗法应用技能评估试题答案及解析
- 连铸工岗位操作技能考核试卷及答案
- 刨花板工职业考核试卷及答案
- 职业技能培训知识宣讲课件
- 利用食用油成分护肤品创新创业项目商业计划书
- 婚内财产分割协议书模板
- 食品行业采购管理流程及实施细则
- 2025年新版小学语文新课标标准课件
- 《功能高分子材料》课程教学大纲
- 企业反恐防暴安全
- 高标准农田建设项目方案投标文件(技术方案)
- 《大学生求职面试礼仪指南课件》
- 私募股权投资基金(双GP)合作框架协议书范本
- 城市经理人合作合同范本
- 2025年度合伙人股权代持风险防范及解除协议
- 电网工程设备材料信息参考价(2024年第四季度)
评论
0/150
提交评论