win7下的php

來源:互聯網
上載者:User
win 7下的php 第一天

(1)下載安裝工具 wampServer

(2)排除obstacle,

先關閉iis
1)關閉iis服務 iisadmin
2)關閉iis下的虛擬機器主機執行個體,預設的網站(中間現實一個IIS的大jpg映像,指向iis.net),
win7下 “控制台” - “管理工具” “IIS管理器” 刪除應用即可。

如果使用連接埠查看器,會發現,80連接埠被系統所佔用了,儘管進程選項中並沒有出現iisadmin這一項,但是它被預設啟動了,
被裝入了windows的服務項,也就是說,只要你在iis上設定了這個虛擬目錄,那麼它就會在你登陸windows的時候把它裝載進來,並且
佔用了你的80連接埠,
使我的apache用不了(因為佔用了80連接埠)

好了,現在我已經成功的進入了我的wampServer了。
真令人高興啊。~~

http://localhost

http://localhost/phpmyadmin


建立了一個汽車商店的表單,提交給processorder.php處理,
顯示處理的結果。

myphp.php

myphp.php


 
processorder.php
 

processorder.phpsimplyman's auto parts - order results

Bob's auto parts

Order results

Order processed at '. date('H:i, js F').'

'; //$tireqty; //$_POST[_'tireqty'] //$HTTP_POST_VARS[ 'tireqty'] $tireqty = $_POST['tireqty']; $oilqty = $_POST['oilqty']; $sparkqty = $_POST['sparkqty']; /* echo '

Your order is as follows :

'; echo $tireqty. ' tires
'; echo $oilqty. ' oils
'; echo $sparkqty.' sparks
'; */ //echo '$sparkqty sparks '; /* echo <<= 10) && ($tireqty <= 49)){ $discount = 5; }elseif(($tireqty >= 50 )&&($tireqty <= 99)){ $discount = 10; }elseif($tireqty >=100){ $discount = 15 ; } if($totalqty == 0): echo '

'; echo "You didn't order anything on the previous page!
"; echo '

'; exit; endif; /* if($totalqty == 0 ){ echo '

'; echo "You didn't order anything on the previous page!
"; echo '

'; exit; } else { if($tireqty > 0 ) echo $tireqty. ' tires
'; if($oilqty >0) echo $oilqty. ' bottles of oils
'; if($sparkqty > 0) echo $sparkqty.' sparks
'; } */ $find=$_POST['find']; switch($find){ case 'a' : echo "

Regular customer.

"; break; case 'b': echo "

Customer referred by TV advert.

"; break; case "c": echo "

cusomer referred by phone directory

"; break; case "d": echo "

Customer referred by word of mouth.

"; break; default: echo "

we do not know how this costmer found us.

"; break; } echo "Item ordered :".$totalqty."
"; $totalamount = (float)$totalqty ; //$varname ='tireqty'; //$$varname= 5; $tireqty = 5'; define('TIREPRICE',100); define('OILPRICE',10); define('SPARKPRICE',4); //echo TIREPRICE.' tireprice
'; $totalamount =0.00 ; $totalamount = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE ; echo "Subtotal :$" .number_format($totalamount,2)."
"; $taxrate = 0.10 ;//local sales tax is 10% $totalamount = $totalamount * (1 + $taxrate); echo "Total including tax :".number_format($totalamount,2)."
"; $a = 56 ; echo gettype($a).'
'; settype($a,'double'); echo gettype($a)."
"; echo 'isset($tireqty,$oilqty,$sparkqty):'.isset($tireqty,$oilqty,$sparkqty).'
'; echo 'isset($nothere):'.isset($nothere).'
'; echo 'empty($tireqty):'.empty($tireqty).'
'; echo 'empty($nothere):'.empty($nothere).'
'; ?>



here is not Order processed

" ?>
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.