Thesis Formatting System—Design and Implementation of the Front Desk

Thesis Formatting System —Design and Implementation of the Front Desk

 

Summary

The system is a web-based software. The client side of the system uses javascript and php as the development language of the platform, Mysql as the background database, and Apache2.0 as the web server. The system uses javascrit script to encapsulate the data in the form on the client side and encapsulate the data into an xml string, and then sends the string to the server. After receiving the xml sent from the server, the system parses the xml with javascript script and fills it in the form. They can publish their papers on time. The system also provides a thesis interaction platform for students and tutors. The thesis interaction platform uses PHP scripts to write database operation classes and common function classes, and then use these classes to create new objects to use the methods in the objects, such as database connection methods, database Query methods, methods of uploading papers, etc. And use Apache's rewrite module to redirect the requested url. This paper also introduces the Smart template system and the role it plays, and uses an example to describe how it can be used to separate php scripts from html code. The paper also explains some problems encountered during the system development, such as the problem of changing the mysql database password and other problems.

Keywords : javascript; xml; php; mysql; Apache; thesis

Table of contents

1 Introduction

2 system requirements

2.1 Overview of System Requirements

2.2 System detailed requirements analysis

2.2.1 Web-based development

2.2.2 Formatting documents

2.2.3 Front desk requirements

2.2.4 Performance requirements

3 options

3.1 Scheme comparison

3.1.1 System mode comparison

3.1.2 Selection and comparison of programming languages

3.1.3 Selection of database

3.1.4 Selection of development tools

3.2 Environment Construction

3.2.1 Install Apache web server

3.2.2 Install PHP

3.2.3 Install Mysql

4 overall design

4.1 System architecture design

4.1.1 Network Architecture

4.1.2 System logic server

4.2 Overall structure

4.3 System work flow chart

5 Implementation and coding

5.1 Database design

5.2 Database table structure design

5.3 System program realization

5.3.1 Foreground javascript program workflow

5.3.2 Home page design and javascript encapsulation XML

5.3.3 Sending XML through the XMLHttpRequest object

5.3.4 Introduction to Smart template

5.3.5 Application of Smart template in this system

5.3.6 Encapsulation and operation of system database

5.3.7 Encapsulation design of common system functions

5.3.8 Application of Apache Rewrite function in the system

6 Solutions to special problems

6.1Mysql database password modification problem

6.2 PHP automatic escape problem

7Test and result analysis

7.1 Examples of running modules

7.1.1 Foreground upload record module example

7.1.2 Example of system administrator module

7.1.3 Examples of student function modules

7.1.4 Examples of tutor function modules

7.2 Test results and analysis


1 Introduction

In people's busy working environment, many data files need to form standardized files for easy classification and storage. In the information society, all the previously hand-written documents have been replaced by the unified document editing software provided by the computer office platform. Of course, the written The format of the document is also unified, including the font, font size, markup, page number, etc. of the content in the document. For example, the Word document format of Microsoft Corporation in the United States has become a standard in the world and is universally used throughout the world. Another example is the PDF document format of Adobe Corporation, which is also a world standard and a document format commonly used by people. However, in daily office work, people need to edit documents in document editing software, and it takes a lot of time and energy to edit the format of the document, such as font, font size, etc. For the same type of document, the format is standardized. Yes, but it is impossible for the document editor to provide every standardized template, because each region or enterprise has its own specifications, and people need to edit it by themselves, which reduces the efficiency of office work, for individuals and enterprises Said it was a waste of time and increased costs. So smart people began to think of a way to solve this problem, and new software came into being, and a lot of PDF and Word document conversion software emerged. They are very powerful, and they can not only convert PDF to Word, but also convert Word to PDF PDF format, and some can also convert documents in other formats, such as converting Html documents into PDF documents.

Considering that teachers and students in institutions of higher learning also have to write papers, and the written papers must be saved as documents in a specific format to ensure the standardization of papers. For this reason, we have designed a system for graduates to convert papers into specifications The format saves a lot of time for editing papers, improves the efficiency of publishing papers, reduces the frequency of paper revisions, and brings great convenience to students. We position the system in the B/S mode, mainly considering the ease of use of the system. The client only needs to install the IE browser to use the thesis formatting system by visiting the website, which is only a major advantage of this system. The background of this system is developed by JSP, the front desk is developed by php and javascript, and the server environment is windowsNT+Apache Tomcat+Mysql. The background development tool uses Eclipse, and the front-end development tool uses EditPlus and DreamwearMX.

2 system requirements

2.1 Overview of System Requirements

The system is used to assist college graduates in their graduation thesis writing, to provide students with a unified document specification and formatting platform, and requires an information platform that facilitates communication between students and teachers. The system runs in a network environment and needs to be practical, easy to use and efficient.

2.2 System detailed requirements analysis

2.2.1 Web-based development

The system works in a network environment, adopts B/S mode for development, needs to support at least one mainstream browser, and the system character set adopts UTF8.

2.2.2 Formatting documents

After the user submits the form, the background needs to be able to generate RTF and PDF documents, and automatically prompt the user to download and save.

2.2.3 Front desk requirements

1. The operation of the front desk user is simple and humanized, and it supports the format verification of the information filled in by the user, and a prompt will be given if it is incorrect;

2. Support students and tutors to register, fill in the information verification, if it is incorrect, a prompt will be given, and the submission can only be submitted if the information is complete;

3. Support students and tutors to log in, fill in the information verification, and will give a prompt if it is incorrect;

4. Support students to retrieve records and automatically restore to the user paper filling form;

5. Support students to upload records, automatically wind them into xml file format and send them to the server;

6. Support students to upload papers, only students have upload permission to operate, upload selected files, supported file extensions are pdf, rtf, doc, docx, rar, zip, and there is a description of the uploaded file;

7. Support tutors to download and view students' uploaded papers. Only tutors have permission to operate, and tutors can only view the papers uploaded by their own students;

8. Support tutors to put forward revision opinions and evaluate scores. Only the tutor has the authority to operate, and the comments and scores correspond to the uploaded records of students;

9. Support background management, including management of background management users, student management, tutor management, department management, management of uploaded papers, management of resource release, management of user messages, only the background administrator has the operation authority, and the background administrator can have Different operation permissions, for example, can only have resource publishing permissions, and administrators with background management user management permissions can assign operation permissions to different administrators.

2.2.4 Performance requirements

1. Security, the background management sets administrator permissions, and students and tutors have their own operation permissions;

2. The system needs to be easy to use and practical, and must realize key functions;

3. Able to bear a large load, choose a suitable development environment, including web server, database and development language.

3 options

3.1 Scheme comparison

3.1.1 System mode comparison

The current development models mainly include C/S structure and B/S structure:

The C/S structure, that is, the Client/Server (client/server) structure, is a well-known software system architecture. By reasonably assigning tasks to the Client and Server, the communication overhead of the system is reduced, and both ends can be fully utilized. Advantages of the hardware environment.

B/S structure, that is, Browser/Server (browser/server) structure, is a change or improved structure of C/S structure with the rise of Internet technology. Under this structure, the user interface is completely realized through the WWW browser, part of the business logic is realized at the front end, but the main business logic is realized at the server side. The B/S structure uses the increasingly mature and popular browser technology to realize powerful functions that originally required complex special software, and saves development costs. It is a brand-new software system construction technology.

3.1.2 Selection and comparison of programming languages

1. Overview of PHP language

PHP (Hypertext Preprocessor), which is a recursive abbreviation name, is an HTML embedded language (similar to ASP on IIS). And PHP's unique syntax mixes C, Java, Perl, and PHP-style new syntax. It can execute dynamic web pages faster than CGI or Perl.

PHP was originally planned and developed by Rasmus Lerdorf in 1994 AD. In 1995, the first version was published as Personal Home Page Tools (PHP Tools)

The third generation of PHP is closely integrated with the Apache server, and it supports almost all mainstream and non-mainstream databases, and its execution efficiency has also improved a lot.

The fourth generation of PHP has added Zend core engine technology, and the core of the entire script program has been greatly changed, so that the execution speed of the program can meet faster requirements.

The fifth generation of PHP, also known as PHP5, has more object-oriented features than PHP4, and the fifth generation of PHP is currently stable.

2. Comparison between PHP and JSP

PHP is very similar to JSP technology, both of them provide the ability to mix some kind of program code in HTML code, and the language engine interprets and executes the program code. And both parties can provide programmers with the function of component design (PHP uses COM components, JSP uses Java Bean components). Both are scripting languages ​​for the Web server side, and the client browser does not require any additional software support.

The main difference between the two:

①Selection of platform and server

PHP is originally an open source project. The main operating systems it supports are Unix and Linux. Of course, as PHP matures, PHP can also be used under the windows platform, and PHP is very portable. The databases it supports cover almost all popular databases in the world, such as: mysql, oricle, etc., even Access. 

JSP technology mainly runs on a Java Virtual Machine virtual machine on the operating system, so it can cross all platforms, and jsp is more suitable for enterprise-level development than php, and its security is better, but jsp is not an open source With the maturity of php, jsp will face the challenge of php.

②Grammar structure

Jsp is a completely object-oriented language, and php is a mixture of C, Java, Perl and PHP-style new syntax, so jsp is more strict than php, while php is more free and flexible. Of course both are languages ​​that can be embedded in HTML.

③Extensibility of grammar

Both PHP and JSP use tags and Scripting Language to make dynamic WEB pages. Different versions of PHP have different features. For example, PHP5 supports object-oriented features better than PHP4, but cannot support multiple inheritance, while JSP is a completely oriented Object language, its extensibility is better than PHP.

④ Execution performance

Since PHP4 adopts the Zend engine, the execution speed of PHP is 10 times that of the original, which greatly improves the efficiency of web page execution. Many business websites use PHP to improve profitability. In addition to the long loading time of JSP at the beginning, the performance of JSP is far better than that of ASP. The reason is: when JSP receives a request at the beginning, it will generate a Servlet entity (instance), which will be temporarily stored in memory, generally called persistence (Persistence), when there is the same request again, this entity A thread will be generated to serve it. If the entity is no longer used after a period of time, the Container will automatically release it. As for the length of time, it can usually be set on the Container itself. So both have their strengths. The execution process of PHP is shown in Figure 3-1:

From the above comparison, it can be seen that php is more suitable for small and medium-level web program development than jsp. Since the requirements of our system are not very complicated and huge, and php fully meets the requirements of the system, the selected php is comprehensively considered. as a development language.

3.1.3 Selection of database

The database of this system is mysql. First, it provides extended database programming functions based on Web standards, which can support Web analysis and Web access to data. Second, it has good portability and can be ported to almost all platforms. Finally, it's free, a huge cost savings.

3.1.4 Selection of development tools

EditPlus is a tool often used by phper. It is small, fast, and can write programs efficiently. Because other more powerful editors provide many convenient functions, it is not easy to learn the PHP language. Once you leave Without a powerful editor, you can't write PHP programs, so I chose EditPlus2.0. Front page design, using Dreamweaver MX 2004.

3.2 Environment Construction

3.2.1 Install Apache web server

Select Apache2.0.55 version, the installation path is: E:\Apache Group\Apache2, after the installation is complete, perform the following configuration:

First open the E:\Apache Group\Apache2\conf\ httpd.conf file, find DocumentRoot, and set the place where the web program is placed here. I set it to E:\www, and all my web files will be placed here Under the directory; then find the DirectoryIndex item, add index.php behind, which is to set index and php as the default home page; add AddType application/x-httpd-php.php, which is to integrate php and apache , apache will notify the PHP execution program when it gets the request; add PHPIniDir C:/php4/php.ini, here I use php4, php.ini is the configuration file of php, and explain it when talking about the installation of php; add LoadModule php4_module C :/php4/php4apache2.dll, which is also an important configuration for integrating php and apache; find LoadModule rewrite_module modules/mod_rewrite.so, remove the "#" in front, find AllowOverride None, change None to All to enable the rewrite module.

3.2.2 Install PHP

Unzip the downloaded PHP4 package to C:\php4, rename php.ini_dist to php.ini, and open php.ini for configuration:

Find extension_dir, change it to c:/php4/extensions, this directory is the dll to be used by php, find extension=php_mbstring.dll, etc., remove the front ";" to load the required dynamic link library. Find shorttarg and set it to ON to prevent the writing of "<? ?>" in PHP from being blocked.

3.2.3 Install Mysql

Go to www.mysql.com to download the binary installation package under windows. After the download is complete, it will be installed by default, but it should be noted that the default character set of mysql is set to utf8 in the detailed configuration.

4 overall design

4.1 System architecture design

4.1.1 Network Architecture

The entire network architecture system is as follows:

 

Figure 4-1 Thesis Formatting System (Foreground) Network Architecture Diagram

As can be seen from Figure 4-1, a web server, a mysql database server, LAN client and remote client constitute the B/S structure of the system, and they must communicate on the basis of the network. The client accesses the web server through a browser. The web server is installed and configured with two web servers, one is a tomcat apache, and the other is an apache server. The port of the former is 80, and the port of the latter is 8080. The web server side executes the request sent by the browser, and then returns the information to the browser, and the database storage script on the server side will be stored in mysql and written to the xml file on the server side according to the different requests.

4.1.2 System logic server

Logically, the servers used can be divided into two categories, each with different functions:

Web server: This server publishes on the Web, provides an operation interface (web page) for ordinary users' business work, and transmits the user's operation parameters back to the application server, and returns the results to the user's front end through the web page.

Database server: The mysql database system is installed on this server, and the design of the database system is mainly aimed at this server. All original data and other structural data used in the system are stored here, and all data entry and modification by users and managers will eventually be saved here.

4.2 Overall structure

The structure diagram of the main functional modules of the thesis formatting system (foreground) is as follows:

Figure 4-2 Structural diagram of the functional modules of the thesis formatting system (foreground)

 

From Figure 4-2, we can see the functional modules of the thesis formatting system (front desk). Among them, in all background management sub-modules, operations of adding, editing and deleting are included. Record encapsulation, record sending, and record restoration modules are completely processed on the client side using the front-end javascript program.

4.3 System work flow chart

The system processing flow chart is as follows:

Figure 4-3 System work flow chart

 

The above figure 4-3 is the working flow chart of the system, through which we can clearly understand how the working process of the system is carried out.

5 Implementation and coding

5.1 Database design

Figure 5-1 Data structure diagram of the paper interactive platform

 

From Figure 5-1, we can see that there are 6 tables, and the figure shows the structural relationship of the 6 tables. In the thesis uploading and scoring platform made by php, there are three different users, one is the system administrator, one is the student, and one is the tutor. The three users have three permissions, so the system administrator table user and the student table student are required. Tutor table teacher. The system needs to upload papers, so there needs to be a paper table tutorials for storing paper information. In addition, the pm table is required as a short message table. There must be a department management table xicate. There must be a teacher message release form teachermsg. These 6 tables are interrelated, and changes in one table will affect changes in other tables.

5.2 Database table structure design

After determining the logical relationship and data structure of the database, further transform the above-mentioned eight data tables from the conceptual structure into the actual data model supported by the database system, that is, the logical structure of the database.

Table 5-1 shows the system administrator information table (user), which records user information.

Table 5–1 user table

field

type

Null

default

describe

Id (primary key)

int(3)

no

administrator number

name

varchar(32)

no

name

password

varchar(32)

no

password

can_setting

tinyint(1)

no

0

System Settings Permissions

can_article

tinyint(1)

no

0

Press Release Rights

can_guest

tinyint(1)

yes

0

Manage Message Board Permissions

can_user

tinyint(1)

no

0

Manage System Administrator Privileges

can_resorce

tinyint(1)

yes

0

Publish resource permissions

can_xicate

tinyint(1)

no

0

Faculty of Management department authority

Table 5–2 shows the system settings table (settings), which is used to set system variables:

Table 5–2 settings table

field

type

Null

default

describe

id (primary key)

int(5)

no

Setting item number

varname

varchar(255)

no

setting item name

setting

varchar(255)

no

Setting item description

value

text

no

set item value

type

varchar(20)

no

Setting item display type

Table 5–3 shows the student table (student), which is used to store student information:

Table 5–3 student table

field

type

Null

default

describe

id (primary key)

int(11)

no

student number

time

int(11)

no

Tutor number

name

varchar(64)

no

student real name

logname

varchar(34)

no

student login name

password

varchar(64)

no

password

email

varchar(64)

no

mail

call

varchar(16)

no

Telephone

cid

int(11)

no

Department number

number

varchar(30)

no

student ID

title

varchar(100)

no

Essay topic

Table 5–4 shows the teacher table (teacher), which is used to store the information of the tutor:

Table 5–4 teacher table

field

type

Null

default

describe

id (primary key)

int(11)

no

Tutor number

name

varchar(64)

no

Tutor's real name

logname

varchar(34)

no

Tutor login name

password

varchar(64)

no

password

email

varchar(64)

no

mail

call

varchar(15)

no

Telephone

cid

int(11)

no

Department number

Table 5–5 shows the paper table (tutorials), which is used to store the information of uploaded papers:

Table 5–5 tutorials table

field

type

Null

default

describe

id (primary key)

int(11)

no

Paper number

sid

int(11)

no

student number

time

int(11)

no

Tutor number

title

varchar(64)

no

Essay topic

description

text

no

describe

link

varchar(200)

yes

file name

comment

text

yes

Advice from a mentor

mark

varchar(6)

no

Not rated

The paper score

time

int(11)

no

Upload time

Table 5–6 shows the department table (xicate), which is used to set the department information of the college:

Table 5–6 xicate table

field

type

Null

default

describe

id (primary key)

int(11)

no

Department number

name

varchar(64)

no

Department name

Table 5–7 shows the statistical online table (session), which is used to count the number of online users:

Table 5–7 session table

field

type

Null

default

describe

ip

varchar(15)

no

user ip address

visiting hours

varchar(20)

no

user access time

Table 5–8 shows the teacher release message table (teachermsg), which is used to store the notification issued by the tutor:

Table 5–8 teachermsg table

field

type

Null

default

describe

id (primary key)

int(11)

no

message number

time

int(11)

no

Tutor number

name

varchar(34)

no

tutor name

title

varchar(64)

no

title

content

text

no

content

time

int(12)

no

release time

Table 5–9 shows short messages (pm), which are used to store short messages sent by students and tutors:

Table 5–9 pm table

field

type

Null

default

describe

id (primary key)

int(11)

no

message number

sid

int(11)

no

student number

time

int(11)

no

Tutor number

sendname

varchar(64)

no

sender name

resvname

varchar(64)

no

recipient name

title

varchar(43)

no

title

content

text

no

content

send

tinyint(1)

no

1

send

readed

tinyint(1)

no

0

read

toteacher

tinyint(1)

no

1

send to tutor

time

int(11)

no

0

sending time

Table 5–10 shows the resource table (resorce), which is used to store the paper resources published by the system administrator:

Table 5–10 resource table

field

type

Null

default

describe

id (primary key)

int(11)

no

resource number

title

varchar(64)

no

resource title

description

text

no

resource description

link

varchar(64)

no

resource file name

time

int(11)

no

release time

Table 5–11 shows the news table (article), which is used to store news published by the system administrator:

表5–11 article 表

字段

类型

Null

默认

id(主键)

int(11)

新闻编号

title

varchar(64)

新闻标题

content

text

新闻内容

time

int(11)

发布时间

表5–12所示为留言表(guestbook),用于存放访客留言信息:

表5–12 guestbook 表

字段

类型

Null

默认

id(主键)

int(10)

留言者编号

name

varchar(64)

留言者名称

email

text

留言者邮件

content

text

留言内容

time

int(10)

留言时间

hidden

tinyint(1)

是否隐藏留言

5.3系统程序实现

5.3.1前台javascript程序工作流程

下图为工作流程图:

图5-2前台javascript工作流程

5.3.2首页的设计与javascript封装XML

图5-3首页

由图7可以看到首页是一张大型的表单,用于用户填写论文的相关信息以及内容,然后提交给后台保存为xml文件。这里就需要编写javascript脚本程序操作页面表单,将用户填写的信息封装成xml格式的。通过对表单的分析,找出需要操作的对象,主要是要取出<input>标签和<textare>标签中内容,一一对应封装到xml里面。这里主要通过两个函数给予实现,一个是function XMLWriter(),一个是function xmlEncap(),XMLWriter()为xmlEncap()提供了封装xml的操作,而xmlEncap()是要取出不同的对象调用XMLWriter()中的方法。

5.3.3通过XMLHttpRequest对象发送XML

这是Ajax技术运用的一部分。前台通过function createXMLHttpRequest创建XMLHttpRequest对象,代码如下:

图5-4创建XMLHttpRequest对象代码

对于有的浏览器不支持XMLHttpRequest对象,但是提供了ActiveX控件,考虑到兼容性程序支持了不同浏览器创建XMLHttpRequest对象。创建好对象后便可在upload方法中使用对象的方法进行与服务器端的通信。主要方法使用情况如下:

1.设置传送方式:XMLHttpReq.open("post", action,true);

2. XMLHttpReq.setRequestHeader("Content-Type","text/xml")设置http协议header类型;

3.发送XML: XMLHttpReq.send(xml);

4.得到readyState和status属性的值,当XMLHttpReq.readyState 为4 表示接收服务器响应完成,XMLHttpReq.status为200表示接收到的信息没有异常。

5.3.4Smart template简介

Smart template模板引擎是国外一个开源项目,它由php语言编写,主要用于将php代码与html网页代码进行分离,让程序员可从烦琐的程序嵌套工作中解脱出来,并且提高网页运行的速度,提高开发的效率。

5.3.5Smart template在本系统中的运用

首先到系统的配置文件中进行配置,配置如下图所示:

图5-5 smart template在系统中的配置

配置说明:

1.$_CONFIG['template_dir']是模板文件存放的目录;

2.$_CONFIG['smarttemplate_compiled']是模板被smart template编译后存放的目录;

3.$_CONFIG['smarttemplate_cache']是模板缓存文件存放的目录;

4.$_CONFIG['cache_lifetime']是缓存文件的生存时间

具体在程序中的使用方法如下:

$page = new SmartTemplate( "template.html" );

$page->assign( 'TITLE',  'TemplateDemo - Userlist' );

$page->assign( 'user',   DB_read_all( 'select * from ris_user' ) );

$page->output();

5.3.6系统数据库封装与操作

系统中数据库封装与操作共有两个类,一个是db_driver,一个是db_main,其中db_driver继承了db_main。他们封装了数据库的连接和数据库查询,插入,更新记录的操作,并且提供了通过数组形式编写sql语句的方法。

在使用前应该配置好系统的变量,打开config.php配置如下表:

配置说明:

1.$INFO['sql_driver']说明采用数据库类型为mysql;

2.$INFO['sql_host']是数据库在网络中的地址;

3.$INFO['sql_database']是要操作的数据库名;

4.$INFO['sql_user']是数据库用户;

5.$INFO['sql_pass']是数据库用户的密码;

6.$INFO['sql_tbl_prefix']是数据库中表的前缀。

具体在程序中的使用方法如下图所示:

5.3.7系统常用函数封装设计

类名ConvterSystem,里面封装了分页方法,生成验证码的方法,去掉html代码的方法,截取字符串函数。

管理员登陆页面admin_login.html中,<img src="./admin.php?verify=1" />显示生成的验证码图片,在admin.php中初始化类ConvterSystem,然后在使用ConvterSystem的方法:show_gd_img($number),其中$number是用mt_rand函数随即产生的,这样就可以生成一张带有验证码的图片。

在分页的操作中,PageLinkR方法提供了链接的生成,需要先对数据库表进行查询得到记录的总数,然后设置好每页显示的记录数,算出一共的页数,再对表进行limit查询,其中limit从第几个记录开始是从URL传过来的。

5.3.8Apache Rewrite功能在系统中的运用

本系统用到rewrite功能,在环境配置的时候就开启了apache的rewrite模块。Rewrite规则的编写在.htaccess文件中。所有规则编写如下图所示:

Rewrite规则就是通过编写正则表达式,将匹配的url重新定向到要执行的php脚本程序,这样可以让用户看不到访问的是哪个php脚本程序,看到都是.html后缀的url,可以防止恶意用户盗取链接。其中第一行的意思是当遇到404错误的时候页面将自动跳转到http://127.0.0.1:8080/biye。

6特殊问题解决办法

本系统在设计和开发过程中,也遇到了不少的问题,就其中较特殊问题分析及解决方案描述如下:

6.1mysql数据库密码修改问题

在开发过程中,有时候会重新安装mysql数据库,有时候也会去更改mysql的密码。这里就存在一个mysql的密码修改的问题。Mysql的密码修改有几种方式,我选用的是在root帐户下用sql语句进行修改,但是修改后系统无法与数据库连接,用flush privileges;命令刷新权限也不行。查阅资料原来是mysql版本的问题,高版本的mysql数据库已经改用默认的新加密方式,而数据库连接的时候还是采用的老的加密方式,这需要在修改密码的时候使用old_password(),然后再刷新权限,这样才能连接数据库。

6.2php自动转义问题

在查询数据库的操作中,取出的数据有时候会带有”\”符号。查阅资源后发现在表单提交过程中,如果php开启了gpc_magic那么php将会把POST和GET过来的字符串自动转义掉,也就是在特殊字符前加上”\”转义符号,那么插入数据库的时候就会带有”\”符号,如果不注意取出的数据中就会带有”\”,所以取出数据时应该用stripslashes(var $string)对字符串进行处理拨去”\”符号。

7测试与结果分析

7.1运行模块举例

系统根据用户的角色及业务需求,分配相应的模块操作权限、数据库操作权限即相关的角色,所授予的模块和数据库操作权限通过菜单框架结构和页面组合,形成用户业务操作平台及操作界面。

7.2测试结果与分析

系统在网络环境下工作正常,没有出现异常报错和乱码显示等错误。结果显示在多用户情况下系统表现稳定,并体现了系统的易用性。用户可以成功的上传记录,转换记录,提取记录,并能成功的上传论文给自己的导师,导师的所有操作也表现正常。系统后台管理方便快捷,能成功的实现每个管理功能,权限的有效控制也做到系统的安全。但系统依然存在这一些问题如下:

1.前台论文表单页面请求响应速度过慢。

根据分析,原因是前台的javascript代码量庞大,使页面下载的速度减慢。

2.提取记录还原表单会出现文本框被撑开的现象。

根据分析,是前台页面设计时,<textarea>标签的属性问题。

3.论文记录显示中会有转义符号的出现。

根据分析,是因为在从数据库中取出记录的时候没有去掉专一符号就显示记录了。

    

目前,经过紧张而有序的毕业设计,论文格式化系统前台的大部分主要功能已经得到实现,还有部分功能因为时间原因没能完善。

系统现在可以实现的功能有:

1.前台表单可以动态变化,封装XML,还原记录到表单;

2.学生提交论文,发送短消息给导师,导师查看下载论文,并提出修改意见和评定论文分数;

3.系统管理员管理系统,包括系统设置、学生管理、导师管理、上传论文管理、新闻发布管理、资源下载管理、留言板管理、管理员权限管理。

本系统的设计与开发在老师的领导下都参照软件开发公司的设计与开发模式。通过对本系统的需求分析,概要设计、详细设计、编码、测试等每一部分的学习和实践。在开发过程中,我体会到了团队合作的重要性,从陌生到熟悉,然后达到默契的合作,项目的进展全靠我们的沟通和交流,可以说没有交流就没有进步,就完不成系统的各项功能,反而会造成团队内部的矛盾。系统的设计阶段是项目顺利开展的关键,设计的阶段的质量优劣,直接影响到以后系统质量。需求是否准确,影响到最后系统是否能达到用户的要求。如果设计合理,在编码阶段实现就相对容易了。可以说每一个阶段的过程都是艰辛的,需要大量的时间与精力,在借助于现有的资料和技术之上,少走弯路,但在完全没有经验的情况我们也摸着石头过河,在反复实践中积累经验,修改程序。

本系统的实现过程中,本人对php、Javascript、mysql数据库、apache、ajax等都更深层次的认识和理解。本人相信这对以后工作将会大有益处的。

通过毕业设计,我熟悉了web应用程序的开发和设计,了解了jsp,熟悉了php和javascript的编程,但是还有许多不足的地方和疑问需要靠我今后的努力去解决,总的来说,毕业设计让我学到了不少的知识。

参考文献

[1] Luke Welling,Laura Thomson.PHP and MySQL WebDevelopment[M].北京:机械工业出版社,2005。

[2] David Flanagan.javascript权威指南[M].北京:电子工业出版,2001。

[3] George Reese,Randy Jay Yarger,Tim King,Hugh E. Williams.MySQL权威指南(第二版)[M].北京:电子工业出版,2003。

[4] 袁建洲,尹喆.JavaScript编程宝典[M].北京:电子工业出版,2006。

[5] 赵增敏.Web应用开发案例教程[M].北京:电子工业出版社,2006。

[6] 高寿福.PHP程序设计导学[M].北京:北京科海电子出版社,2003。

    

本文是在高宏宇老师的热情关心和指导下完成的,他渊博的知识和严谨的治学作风使我受益匪浅,对顺利完成本课题起到了极大的作用。在此向他表示我最衷心的感谢!

在论文完成过程中,本人还得到了盛志伟老师和余栋梁同学的热心帮助,本人向他们表示深深的谢意!

最后向在百忙之中评审本文的各位专家、老师表示衷心的感谢!

 

关注博主下篇更精彩

一键三连!!!

一键三连!!!

一键三连!!!
感谢一键三连!!!

おすすめ

転載: blog.csdn.net/m0_56073435/article/details/131479583