版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、2013屆本科生畢業(yè)設(shè)計(論文)外文翻譯畢業(yè)設(shè)計(論文)外文翻譯源代碼需要聯(lián)系qq:68661508學(xué)生姓名 專業(yè)班級 r機械08-3班 所在院系 機械工程學(xué)院 指導(dǎo)教師 職 稱 講師 所在單位 軟件工程教研室 完成日期 2013 年 4 月 5 日外文原文behavior research methods 2005, 37 (4), 703-710generic html form processor: a versatile php script to save web-collected data into a mysql databaseanja s gritz and michael
2、 h birnbaumin the last decade, the execution of experiments and surveys via the world-wide web has become an established method (see birnbaum, 2001, 2004a, 2004b; kraut etal.,2004). several reviews have concluded that the quality of data achieved in online studies can be comparable to, and sometimes
3、 better than, that obtained. by more traditional methods involving a lab, paper questionnaires, or telephone interviews (birnbaum, 2001; krantz & dalal, 2000; mcgraw, tew, & williams, 2000). there are other advantages of web research. on the web, people can be tested at any time and place, laborator
4、y rooms or physically present experimenters are not necessary (so experimenter effects remain constant), and automated data handling reduces both the labor and error of data coding and entry (birnbaum & reips, 2005; gritz & schumacher, 2000).in addition, the web method allows one to collect large sa
5、mples inexpensively, which makes it possible to draw clear conclusions and to check their generality to different subsamples tested (birnbaum, 1999; reips, 2002). an example of an html web form is given in birnbaum (2000). such an html page can be placed on a server, where the participant can view i
6、t and fill in answers by typing in information and clicking on choices. when the participant is finished, he or she can then click on a button to send the data. birnbaums (2000) surveywiz and factorwiz are freely available programs that make it easy to create html forms for simple surveys and within
7、 subjects factorial experiments. reips and neuhaus (2002) have developed wextor, which is useful for generating web experiments that utilize (for instance) between subjects factorial designs with multiple pages for different conditions.sending data from an html formthere are three methods of receivi
8、ng data that have been collected through an html form. the first method is to use the “get” method and extract the form input from the server log files (see birnbaum & reips, 2005). a second method is to have the form data e-mailed to the researcher. this can be done by means of the html forms actio
9、n attributefor example,.however, some systems refuse such an action attribute if, for example, no e-mail client is set up (as might be the case for, e.g., computers in a public library). moreover, some browsers issue a more or less draconian alert, which the participant has to confirm for the data t
10、o be e-mailed. most problematic for large efforts, though, is the fact that each submission generates its own e-mail, so data need to be extracted from thousands of individual e-mails and merged into one data file. thus, whereas the e-mail method might be useful during testing of a form or for small
11、 efforts like obtaining rsvps to a party, the method is not practical for large research projects. the third method is to use server-side cgi (“common gateway interface”) scripts to process and save the form data. in this case, the action attribute of a web form sends the forms data to a cgi script
12、that is located on a web server (schmidt, 1997, 2000). an example of such an attribute is.thus, use of cgi requires the researcher to have access to a cgi-enabled directory on a web server. there are several benefits of using a cgi script: first, the cgi can process the data and save them in a file
13、format ready for analysis. order bias can be eliminated by presenting items and alternative answers in random order, and the cgi can reorganize the data. also, skip patterns can be incorporated into questionnaires. in addition, participants input can be validated in real time; for example, data erro
14、rs can be detected and respondents pointed to omitted items (gritz & schumacher, 2000).cgi scripts can be written in any language that a given server can execute, such as asp (“active server pages”),perl (“practical extraction and report language”), or php (“hypertext preprocessor”). php is an incre
15、asingly popular scripting language (see as with perl, php interpreters are open-source, free, and available for many different platforms. one can check the availability of php for ones own platform and download a suitable installation package from the downloads section of the php home at .run your o
16、wn server with apache, php, and mysqlthere are many advantages to running your own server (birnbaum & reips, 2005; schmidt, hoffman, & macdonald, 1997). you can configure the most common web servers to work with php. you can install php on a server by following the installation instructions that com
17、e with the downloaded package. in most cases, php is installed on the same server where the html forms reside, but it can also be installed on any other server where the data are to be saved. apache is a powerful, widespread, and flexible open-source web server. apaches web server comes already inst
18、alled in new macintosh computers, as are perl and php, and is freely available for pcs and almost any other platform from . there are two options for how a php script can store the data from the html form. one simple method is to have the script save the form data into a text file that
19、 is located on the server. for example, this might be a comma separated values (csv) file. after all data have been collected, the file can be read into a spreadsheet or statistical application.however, if participants input at some stage of the research needs to be used dynamically to determine the
20、 next question, or if the questionnaire consists of more than one html form, it is advisable to have ones php script save the form data into a database. the advantage of the database is that it can store information about the participant, make computations on those data, and dynamically respond to t
21、he participants behavior. using a database allows the server to keep track of a participant who may perform many tasks over a period of time.servers can use various database applications, including oracle, ms access, and mysql. we recommend mysql because it is an open-source, free, compact, fast, re
22、liable, robust, and multiuser database server that compiles on many platforms. its home page is . mysql databases can easily be administered with the free tool mysql control center (now succeeded by mysql administrator), which can also be downloaded from .a generic html form processor in phpa versat
23、ile php script called generic html form processor has been developed that processes any syntactically correct input from html forms. it is available, along with sample html forms, from the script creates “on the fly” a mysql database containing one data table. in the table, the script dynamically se
24、ts up columns for all submitted html input fields and saves the data in the previously created columns. thus, this script relieves researchers of the burdens of writing a cgi script and building a database to store their data for each new project. to run a survey or experiment, researchers merely ha
25、ve to complete the relatively simple task of creating html forms that fit their needs. there are many commercial and noncommercial html editors available that can assist the researcher with this task. for example, one of the two free programs surveywiz and factorwiz (birnbaum, 2000) might be used. a
26、s a result of this spectrum of possible usage, we will now describe five modes of use that require different levels of knowledge of php and server issues.1.the easiest mode for using generic html form processor is with one-page html questionnaires designed to save data on a server at the first autho
27、rs university. for this purpose, no knowledge of php and web servers is required. the only preparation necessary is to set the action attribute of your html form to the url (internet address) of generic html form processor. the html file itself can reside on any server. let us look at an example htm
28、l form called sample.htm. it contains most of the existing html input field types (see figure 1). figure 1 browser view of example one-page html form sample.htm2.the second mode consists of using generic html form processor with a multipage html questionnaire on the server at the first authors unive
29、rsity. this also requires no knowledge of php or server issues. however, you would have to make a few more changes in your html forms, as follows: first, as in the previous mode, you need to set the action attribute of each of the html forms to the url of generic html form processor. second, to tell
30、 the script which html page it needs to call up after processing the previous page, one extra line of html code must be inserted within the form tags. this line defines the hidden variable next_ page and its value, which is the location of the next html page. an example is shown below in which sampl
31、e2.htm is in the same web folder as generic html form processor:.alternatively, if the next page were called “page_two.html,” this line would read .if the next survey page were located on another server or not within the same directory as the first page, the value should be set to the absolute url o
32、f the second pagefor example,input type =“hidden” name= “next_ page” value=“http:/full_path_on_let us inspect an example survey that consists of three html pages. the first page is sample1.htm (see the source code in listing 2 and the browser view in figure 2), the second is sample2.htm, and the thi
33、rd is sample3.htm.figure 2 browser view of example html form sample1.htmto track individual participants across the pages of a multipage survey, a unique identifier needs to be passed from page to page. this is automatically accomplished by extracting an identifier for each participant (called op56)
34、 from the database and appending it to the query string of the next survey pagefor example, 16&nr93=1.the other transmitted variable, nr93, tells generic html form processor which page of a multipage survey it is dealing with. with the help of javascript, these two variables are extracted from the q
35、uery string and inserted into the html form as hidden variables. therefore, for each page of a multipage survey except the first, a javascript snippet (see the bold print in the sample2.htm source code in listing 3) needs to be pasted within the form tags.figure 3 depicts the browser view of the htm
36、l file sample2.htm.figure 3 browser view of example html form sample2.htmon the third page of our multipage study, sample3.htm, the researcher again needs to paste the javascript snippet between the form tags, but inclusion of the hidden variable next_ page is no longer necessary, because sample3.ht
37、m is the last page of the survey (see the source code in listing 4).figure 4 depicts the browser view of the html file sample3.htm.figure 4 browser view of example html form sample3.htmagain, the script creates a mysql database called“generic” with results table “generic.” because now there are thre
38、e html pages, the names and submission time stamps of pages 2 and 3 are recorded as well (see figure 5). retrieval of the survey data follows the same procedure described for the one-page case.figure 5 sample table with results from a three-page surveyfor implementing skip patterns in your survey, t
39、here are three options. the first method requires only html and is illustrated at the following url: both other methods use javascript. first, the skip pattern might be included within the same page of a survey (e.g., by having javascript display an additional item or response option if a particular
40、 answer has been selected prior to that). for example, if a respondent indicated having had a particular experience, an additional item could come up that would ask the respondent to de scribe this experience in more detail. the third option (and the second requiring javascript) would be to display
41、any contingent material on a consecutive page. as an example, look at the source code of the html file sample1a.htm in listing 5. this is a modified version of sample1.htm, with the bold text added. if in sample1a.htm a participant indicated that she was female, she would be directed to the interpos
42、ed page sampleextra.htm instead of directly to the page sample2.htm (not shown here, but you can see this example as well as others in action at the same method can also be used for randomization of survey pages. for this purpose, a javascript snippet could draw an element of an array at random. the
43、 next page displayed would be contingent on the element selected.3.the third mode involves using generic html form processor with a one-page html questionnaire on an accessible server with php and mysql. first, download generic html form processor from and extract it onto your server in a suitable d
44、irectory.to customize the scripts behavior, follow the guidelines in the script. alter the action attribute in your html form to the location of the script on your serverfor example,form method= “post” action= “http:/mthe first time the html form is submitted, the script creates a mysql database cal
45、led “generic” with a results table also called “generic.” data may be retrieved from your mysql database either by running a select syntax command or with the help of a graphical administration tool such as mysql control center.note that for the script to function properly, the researcher needs alte
46、r, insert, select, update, and create privileges for mysql. if the researcher wishes to use a public server, he or she might not have some of these privileges, because it is a security hazard to allocate global alter privileges to any user (in this case the researcher). there are three ways of deali
47、ng with this: (1) the researcher may ask the server administrator to create a minimal mysql database with one table in it (this should take less than 1 min) and to allocate the relevant privileges only for the single table within this database. there is no security risk involved in that. (2) since t
48、he alter privileges are needed only oncenamely, to define all possible columns in the mysql databasethe researcher may ask the server administrator to grant him or her alter privileges for 10 min only. in this interval, the researcher can fill out all input fields on all pages of the questionnaire w
49、ith practice data and submit it. (3) the researcher can set up his or her own server and grant him- or herself the needed privileges for this step.4.the fourth mode involves using generic html form processor with a multipage html questionnaire on a server to which you have access. first, put the scr
50、ipt on your server and, if desired, customize it. you will need to alter your html forms as described above for mode 2.5.finally, you are free to further customize generic html form processor to your particular needsfor example, by implementing a more sophisticated input validation. learning php wil
51、l allow you to completely customize your study. 中文翻譯通用html表單處理器:將網(wǎng)絡(luò)上收集到的數(shù)據(jù)保存到mysql數(shù)據(jù)庫的多功能php腳本 在過去的十年里,通過萬維網(wǎng)進行的實驗和調(diào)查已成為一個既定的方法。(見伯恩鮑姆,2001年;克勞特等人,2004年)。從一些評論中我們可以總結(jié)到:通過網(wǎng)上研究獲得數(shù)據(jù)的質(zhì)量可以比得上有時甚至優(yōu)于通過一些傳統(tǒng)方法獲得的數(shù)據(jù)的質(zhì)量,這些方法包括包括實驗、紙質(zhì)問卷調(diào)查、電話采訪等(伯恩鮑姆,2001年;克蘭茨和達拉爾,2000年;麥格勞、克斯圖和威廉姆斯,2000年)。網(wǎng)絡(luò)研究還有其它的優(yōu)勢,在網(wǎng)上,人們可以隨時隨
52、地的測試,而實驗室或?qū)嶒炚邉t并不是必須的(所以實驗者的影響保持不變)。此外,自動化數(shù)據(jù)處理既減少了勞動力又減少了數(shù)據(jù)編碼的錯誤和條目(伯恩鮑姆和瑞普思,2005年;戈瑞茨和舒馬赫,2000年)。另外,網(wǎng)絡(luò)的方法可以低廉地采集大量的樣本,這使得到清楚的結(jié)論成為可能,并檢查他們的一般性,這些一般性與其它被測試的子樣本不同(伯恩鮑姆,1999年;瑞普斯,2002年)。伯恩鮑姆(2000年)給出了一個html 網(wǎng)絡(luò)表單實例。這樣的一個html頁面可以放在一個服務(wù)器上,參與者可以瀏覽它并通過輸入信息或點擊選擇項來填寫答案。當(dāng)參與者完成后,他或她可以通過點擊按鈕來發(fā)送數(shù)據(jù)。伯恩鮑姆的(2000年)surv
53、eywiz和factorwiz是可以免費得到的程序,這些程序可以輕易地創(chuàng)建html表單,這些表單用于簡單的調(diào)查和在被試者之間進行因子試驗。瑞普斯和諾伊豪斯(2002年)開發(fā)的wextor可以用來進行網(wǎng)絡(luò)實驗,這些實驗使用(例如)主題因子設(shè)計和不同環(huán)境下的多個頁面。從一個html表單中發(fā)送數(shù)據(jù)有三種方法可以通過一個html表單接收已經(jīng)收集到的數(shù)據(jù)。第一種方法是使用“get”方法并從服務(wù)器日志文件上提取表單輸入(見伯恩鮑姆和reips2005)。第二種方法是將表單數(shù)據(jù)發(fā)郵件給研究者。這可以通過使用html表單的“action”的屬性來做到,例如:但是一些系統(tǒng)拒絕這樣的“action”屬性,例如沒有
54、建立電子郵件客戶端(可能是以下的情況比如圖書館的計算機)。另外,一些瀏覽器發(fā)出或多或少有些嚴(yán)厲的警告,參與者必須確認(rèn)那些通過電子郵件發(fā)送的數(shù)據(jù)。對于大工作量來說棘手的問題是每一個提交都產(chǎn)生他們自己的電子郵件,所以需要從上千個獨立的電子郵件中提出數(shù)據(jù)并將他們合并到一個數(shù)據(jù)文件中。因此,盡管電子郵件的方法對測試一個表單或者類似于獲得一方回復(fù)的小工作量來說是有用的,該方法對于大型研究項目是不實用的。第三種方法是使用服務(wù)器端cgi(公共網(wǎng)關(guān)接口)腳本來處理和保存表單數(shù)據(jù)。在這種情況下,一個網(wǎng)絡(luò)表單的“action”屬性發(fā)送表單的數(shù)據(jù)到位于一個web服務(wù)器(施密特,1997年、2000年)的一個cgi腳
55、本上。該屬性的一個實例如下:因此,使用cgi要求研究者能訪問到位于一個網(wǎng)絡(luò)服務(wù)器上的一個cgi使能目錄。使用cgi腳本有一些好處:首先cgi可以處理數(shù)據(jù)并將它們以文件的形式保存以用來分析。順序偏差可以通過隨機的展示條目和備選答案來消除。而且cgi可以重組這些數(shù)據(jù)。此外,調(diào)查問卷中可以采用跳躍模式。另外,參與者的輸入可以被實時驗證。比如數(shù)據(jù)錯誤可以被檢測到,受訪者可以指出遺漏的條目(戈瑞茨和舒馬赫,2000年)。cgi腳本可以用任何一種能被一個給定的服務(wù)器執(zhí)行的語言寫成,例如asp(“活動服務(wù)器網(wǎng)頁”)、peal(“實際提取和報告語言”)或php(“超文本預(yù)處理器”)。php是一種日益流行的腳本語言(見 usage.php)。perl、php解釋器
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年城市軌道交通設(shè)備采購框架協(xié)議范本3篇
- 無人機物流配送協(xié)議
- 二零二五年度大型設(shè)備搬運安裝合同2篇
- 2024版外聘講師合作合同模板2篇
- 2025年度柳梅離婚協(xié)議書撰寫與見證合同3篇
- 2024消防安全管理制度設(shè)計與優(yōu)化合同
- 2025年度碳排放權(quán)交易合同標(biāo)的確定及履行3篇
- 二零二五年度新型環(huán)保工地圍擋材料供應(yīng)施工合同2篇
- 二零二五年度建筑工程渣土外運服務(wù)合同3篇
- 2024年版高級品質(zhì)管理專家聘用協(xié)議
- T-BIE 003-2023 通孔回流焊接技術(shù)規(guī)范
- 口腔頜面外科學(xué) 09顳下頜關(guān)節(jié)疾病
- 臺達變頻器說明書
- 2023年廣東羅浮山旅游集團有限公司招聘筆試題庫及答案解析
- DB11-T1835-2021 給水排水管道工程施工技術(shù)規(guī)程高清最新版
- 解剖篇2-1內(nèi)臟系統(tǒng)消化呼吸生理學(xué)
- 《小學(xué)生錯別字原因及對策研究(論文)》
- 北師大版七年級數(shù)學(xué)上冊教案(全冊完整版)教學(xué)設(shè)計含教學(xué)反思
- 智慧水庫平臺建設(shè)方案
- 系統(tǒng)性紅斑狼瘡-第九版內(nèi)科學(xué)
- 糧食平房倉設(shè)計規(guī)范
評論
0/150
提交評論