PHP under the Win7

Source: Internet
Author: User
Tags echo date
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

"?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.