![WEB第二次实验报告(共8页)_第1页](http://file3.renrendoc.com/fileroot_temp3/2022-2/23/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b1.gif)
![WEB第二次实验报告(共8页)_第2页](http://file3.renrendoc.com/fileroot_temp3/2022-2/23/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b2.gif)
![WEB第二次实验报告(共8页)_第3页](http://file3.renrendoc.com/fileroot_temp3/2022-2/23/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b3.gif)
![WEB第二次实验报告(共8页)_第4页](http://file3.renrendoc.com/fileroot_temp3/2022-2/23/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b4.gif)
![WEB第二次实验报告(共8页)_第5页](http://file3.renrendoc.com/fileroot_temp3/2022-2/23/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b/ed0608ef-e6e2-4a6a-9ed7-c50b244cf44b5.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上实 验 报 告(2014 / 2015 学年 第 二 学期)课程名称Web技术实验名称Web服务端脚本编写实验时间2015年5月13日指导单位南京邮电大学指导教师韩京宇学生姓名班级学号学院(系)计算机学院专 业软件工程专心-专注-专业实 验 报 告实验名称Web服务端脚本编写指导教师韩京宇实验类型课内实验学时2实验时间2015.5.13一、 实验目的和要求实验目的:1. 通过上机实验,熟悉Apache服务器的安装和配置使用方法。2. 掌握php脚本语言,熟练运用php语言进行服务端编程。 二、实验环境(实验设备)EditPlus3、 实验原理及内容<head&g
2、t; <meta charset="UTF-8"> <meta name="Generator" content="EditPlus®"> <meta name="Author" content="steacymar"> <meta name="Keywords" content=""> <meta name="Description" content="&quo
3、t;> <title>Welcome to book seller</title> </head> <body> <form action = "Welcome.php" method = "post"> <h1><font face="黑体">You are welcome</font></h1> <table><tr><td>please input your name: </
4、td><td><input type = "text" name = "name"/></td></tr><tr><td>please input your address: </td><td><input type = "text" name = "address"/></td></tr><tr><td>please input your zip: &l
5、t;/td><td><input type = "text" name = "zip"/></td></tr> </table> <p><font face="黑体">please fill in the quantity field of the following form:</font> </p> <table border = "border"><tr><th>
6、;book</th><th>publisher</th><th>price</th><th>quantity</th></tr><tr><th>Web technology</th><td>Springer press</td><td>$5.0</td><td><input type = "text" name = "wt" /></td>&
7、lt;/tr><tr><th>mathematics</th><td>ACM press</td><td>$6.2</td><td><input type = "text" name = "mm" /></td></tr><tr><th>principle of OS</th><td>Science press</td><td>$10</td
8、><td><input type = "text" name = "pOS" /></td></tr><tr><th>Theory of matrix</th><td>High education press</td><td>$7.8</td><td><input type = "text" name = "tom" /></td></t
9、r> </table> <p>payment method:</p> <p> <input type = "radio" name="payment" value = "cash" checked = "checked"/>cash <input type = "radio" name="payment" value = "cheque"/>cheque <input ty
10、pe = "radio" name="payment" value = "credit card"/>credit card </p> <p><input type = "submit" value = "Submit"/><input type = "reset" value = "Reset"/> </p> </form> </body></html>
11、 Welcome.php<html><head></head><body>customer name: <?php echo $_POST"name" ?></br>customer address: <?php echo $_POST"address" ?></br>customer zip: <?php echo $_POST"zip" ?></br><table border = "border
12、"><tr><th>book</th><th>publisher</th><th>price</th><th>total cost</th></tr><?php function total($price,$quantity)$total = $price*$quantity;return $total;?><?php if( $_POST"wt" != 0)echo "<tr><th>W
13、eb technology</th><td>Springer press</td><td>$5.0</td><td> ".total(5,$_POST"wt")." </td></tr>"if($_POST"mm" != 0) echo"<tr><th>mathematics</th><td>ACM press</td><td>$6.2</td
14、><td>".total(6.2,$_POST"mm")."</td></tr>"if($_POST"pOS" != 0) echo"<tr><th>principle of OS</th><td>Science press</td><td>$10</td><td>".total(10,$_POST"pOS")."</td>&l
15、t;/tr>"if($_POST"tom" != 0) echo"<tr><th>Theory of matrix</th><td>High education press</td><td>$7.8</td><td>".total(7.8,$_POST"tom")."</td></tr>" ?> </table> <p><?php echo $_
16、POST"name"." has bought ".($_POST"wt"+$_POST"mm"+$_POST"pOS"+$_POST"tom")." books." ?></p><p><?php $sum = 5*$_POST"wt"+6.2*$_POST"mm"+10*$_POST"pOS"+7.8*$_POST"tom"echo $_P
17、OST"name"." paid ".$sum."." ?></p><p>paid by <?php echo $_POST"payment"."." ?></p><?php$file = fopen("test.txt","w+");fwrite($file,$_POST"name"."hasbought ".($_POST"wt"+$_POST"mm"+$_POST"pOS"+$_POS
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 矿泉水委托加工合作协议书范本
- 连带责任担保公司长期借款合同范本
- 电能质量监测技术在智能家居中的应用
- 科技项目申报委托协议书范本
- 校外培训机构培训服务合同范本
- 陕西省汉中市普通高中十校联盟2024-2025学年高二上学期期中考试生物试题(解析版)
- 山东省聊城市2024-2025学年高二上学期11月期中考试生物试题(解析版)
- 电机控制器故障诊断的现代技术与挑战
- 湖北省部分高中期中联考2024-2025学年高二上学期11月期中考试生物试题(解析版)
- 知识产权拍卖市场现状与趋势分析
- 禽类、水产品配送服务投标方案(技术标)
- 固废运输方案
- 医疗美容门诊病历
- 建设工程前期工作咨询费收费计算表
- 行为矫正技术-课件
- 八年级物理下册《实验题》专项练习题及答案(人教版)
- 停车场管理外包服务合同
- 5.0Mt-a炼焦煤选煤厂初步设计-毕业论文
- 中国工笔花鸟画
- T型广告牌预算表
- 医疗健康-泌尿生殖系统外科疾病主要症状医学课件
评论
0/150
提交评论