WEB第二次实验报告Word文档格式.doc

上传人:wj 文档编号:1450494 上传时间:2023-04-30 格式:DOC 页数:8 大小:244KB
下载 相关 举报
WEB第二次实验报告Word文档格式.doc_第1页
第1页 / 共8页
WEB第二次实验报告Word文档格式.doc_第2页
第2页 / 共8页
WEB第二次实验报告Word文档格式.doc_第3页
第3页 / 共8页
WEB第二次实验报告Word文档格式.doc_第4页
第4页 / 共8页
WEB第二次实验报告Word文档格式.doc_第5页
第5页 / 共8页
WEB第二次实验报告Word文档格式.doc_第6页
第6页 / 共8页
WEB第二次实验报告Word文档格式.doc_第7页
第7页 / 共8页
WEB第二次实验报告Word文档格式.doc_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

WEB第二次实验报告Word文档格式.doc

《WEB第二次实验报告Word文档格式.doc》由会员分享,可在线阅读,更多相关《WEB第二次实验报告Word文档格式.doc(8页珍藏版)》请在冰点文库上搜索。

WEB第二次实验报告Word文档格式.doc

计算机学院

专业

软件工程

实验类型

课内

实验学时

2

2015.5.13

一、实验目的和要求

实验目的:

1.通过上机实验,熟悉Apache服务器的安装和配置使用方法。

2.掌握php脚本语言,熟练运用php语言进行服务端编程。

二、实验环境(实验设备)

EditPlus

三、实验原理及内容

<

head>

<

metacharset="

UTF-8"

>

metaname="

Generator"

content="

EditPlus®

"

Author"

steacymar"

Keywords"

Description"

title>

Welcometobookseller<

/title>

<

/head>

body>

formaction="

Welcome.php"

method="

post"

h1>

fontface="

黑体"

Youarewelcome<

/font>

/h1>

table>

<

tr>

<

td>

pleaseinputyourname:

/td>

inputtype="

text"

name="

name"

/>

/tr>

pleaseinputyouraddress:

address"

pleaseinputyourzip:

zip"

/table>

p>

pleasefillinthequantityfieldofthefollowingform:

/p>

<

tableborder="

border"

th>

book<

/th>

publisher<

price<

quantity<

Webtechnology<

Springerpress<

$5.0<

wt"

/>

mathematics<

ACMpress<

$6.2<

mm"

principleofOS<

Sciencepress<

$10<

pOS"

Theoryofmatrix<

Higheducationpress<

$7.8<

tom"

paymentmethod:

radio"

name="

payment"

value="

cash"

checked="

checked"

cash

cheque"

cheque

creditcard"

creditcard

submit"

Submit"

reset"

Reset"

/form>

/body>

/html>

Welcome.php

html>

customername:

?

phpecho$_POST["

];

?

/br>

customeraddress:

customerzip:

totalcost<

php

functiontotal($price,$quantity)

{

$total=$price*$quantity;

return$total;

}

?

php

if($_POST["

]!

=0)

echo"

<

"

.total(5,$_POST["

])."

;

if($_POST["

=0)

echo"

.total(6.2,$_POST["

.total(10,$_POST["

.total(7.8,$_POST["

}

?

<

<

]."

hasbought"

.($_POST["

]+$_POST["

books."

$sum=5*$_POST["

]+6.2*$_POST["

]+10*$_POST["

]+7.8*$_POST["

echo$_POST["

paid"

.$sum."

."

?

paidby<

$file=fopen("

test.txt"

"

w+"

);

fwrite($file,$_POST["

hasbought"

books.\r\n"

.\r\n"

fwrite($file,"

paidby"

.$_POST["

fclose($file);

四、实验结果

五、指导教师评语

成绩

批阅人

日期

-7-

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2