欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php入門教程之Zend Studio設(shè)置與開發(fā)實(shí)例

 更新時(shí)間:2016年09月09日 14:43:10   作者:onestopweb  
這篇文章主要介紹了php入門教程之Zend Studio設(shè)置與開發(fā),簡(jiǎn)單分析了Zend Studio模板的設(shè)置與php簡(jiǎn)單開發(fā)商品訂單程序的技巧,需要的朋友可以參考下

本文實(shí)例講述了php入門教程之Zend Studio設(shè)置與開發(fā)方法。分享給大家供大家參考,具體如下:

新建文檔的模板設(shè)置

新建文檔的模板設(shè)置

Demo1.php:

<?php
  echo "閱誰問君誦,水落清香浮。"
?>

orderform.php:

<!DOCTYPE  html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>我的第一個(gè)PHP程序</title>
<style>
table {
  background:#ccc;
  width:200px;
  margin:20px auto;
}
table td {
  background:#fff;
}
</style>
</head>
<body>
<form method="post" action="postorder.php">
  <table>
    <tr><td>您的商品</td><td>價(jià)格</td><td>數(shù)量</td></tr>
    <tr><td>蘋果</td><td>2.6元/斤</td><td><input type="text" size="5" name="apple" /></td></tr>
    <tr><td>豬肉</td><td>13.2元/斤</td><td><input type="text" size="5" name="pig" /></td></tr>
    <tr><td>餅干</td><td>21元/盒</td><td><input type="text" size="5" name="biscuit" /></td></tr>
    <tr><td colspan="3" align="center"><input type="submit" value="發(fā)送訂單" /></td></tr>
  </table>
</form>
</body>
</html>

postorder.php:

<?php
  $apple=$HTTP_POST_VARS['apple'];
  $pig=$HTTP_POST_VARS['pig'];
  $biscuit=$HTTP_POST_VARS['biscuit'];
  $apple=$apple*2.6;
  $pig=$pig*13.2;
  $biscuit=$biscuit*21;
  $sum=$apple+$pig+$biscuit;
?>
<!DOCTYPE  html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>我的第一個(gè)PHP程序</title>
<style>
table {
  background:#ccc;
  width:200px;
  margin:20px auto;
}
table td {
  background:#fff;
}
</style>
</head>
<body>
<form method="post" action="postorder.php">
  <table>
    <tr><td>您的商品</td><td>價(jià)格</td><td>小記</td></tr>
    <tr><td>蘋果</td><td>2.6元/斤</td><td><?echo $apple ?></td></tr>
    <tr><td>豬肉</td><td>13.2元/斤</td><td><?echo $pig ?></td></tr>
    <tr><td>餅干</td><td>21元/盒</td><td><?echo $biscuit ?></td></tr>
    <tr><td colspan="3" align="center">一共要支付<?echo $sum ?>元 [<a href="orderform.php">返回修改</a>]</td></tr>
  </table>
</form>
</body>
</html>

更多關(guān)于PHP相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《PHP基本語法入門教程》、《PHP運(yùn)算與運(yùn)算符用法總結(jié)》、《php面向?qū)ο蟪绦蛟O(shè)計(jì)入門教程》、《PHP網(wǎng)絡(luò)編程技巧總結(jié)》、《php字符串(string)用法總結(jié)》、《php+mysql數(shù)據(jù)庫操作入門教程》及《php常見數(shù)據(jù)庫操作技巧匯總

希望本文所述對(duì)大家PHP程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論