The first day of PHP under Win 7
(1) Download the installation tool Wampserver
(2) excluding obstacle,
Shut down IIS First
1) Close the IIS service IISAdmin
2) Close the virtual host instance under IIS, the Default Web site (the middle reality is a large JPG image of IIS, pointing to IIS.net),
Win7 the Control Panel-Administrative Tools, IIS Manager, remove the app.
If you use the Port Viewer, you will find that port 80 is occupied by the system, although IISADMIN is not present in the process options, it is started by default,
is loaded into the Windows service item, that is, if you set up the virtual directory on IIS, it will be loaded when you log in to Windows, and
It takes up 80 of your port,
Makes my Apache useless (because it takes up 80 ports)
Well, now I have successfully entered my wampserver.
That's very nice. ~~
http://localhost
Http://localhost/phpmyadmin
Created a form for a car store, submitted to processorder.php for processing,
Displays the results of the processing.
myphp.php
myphp.php
processorder.php
processorder.php<title>Simplyman ' s Auto parts-order results</title>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 <<
= ten) && ($tireqty <=)) {$discount = 5; }elseif ($tireqty >= && ($tireqty <=)) {$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 don't 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's not
Order processed
"?>