欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

win7下的php

程序员文章站 2024-04-05 20:56:13
...
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
Item Quantity
Tires
Oil
Spark Plugs
How did you find Bob's?

 
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 = 50 )&&($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" ?>
相关标签: win7下的php