PHP是更简单的Web编程语言吗? [英] Is PHP the easier web programming language?

查看:57
本文介绍了PHP是更简单的Web编程语言吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我会研究一种网络编程语言来创建一个PHP脚本

(output.php),给出以下

输入页面(input.htm),用户选择要装运的

包裹的重量和体积,返回各种快递的价格(黄色,

蓝色和黑色)。

真的是PHP我最好的选择吗? ASP要复杂得多吗?那怎么样?
Perl?


~~~输入页面输入.htm:


< form method = QUOT; GET"行动= QUOT; output.php" name =" input">


选择您的套餐音量:


< input type =" radio"名称= QUOT;体积"值= QUOT 1 QUOT;>从0到1立方米

< input type =" radio"名称= QUOT;体积"值= QUOT; 2英寸;>从1到2立方米

< input type =" radio"名称= QUOT;体积"值= QUOT; 3英寸;>从2到3立方米


< br>选择您的包装重量:


< input type =" radio"名称= QUOT;重量"值= QUOT; 100">从0到100 Kg

< input type =" radio"名称= QUOT;重量"值= QUOT; 200">从100到200公斤

< input type =" radio"名称= QUOT;重量"值= QUOT; 300">从200到300公斤



~~~要在output.php中集成的结构脚本:


Courier黄色 - 对于第1,2和3卷:

如果重量= 100然后费率= 600

如果重量= 200然后费率= 900

如果重量= 300然后费率= 1200


Courierblue - 第1卷和第2卷:

如果重量= 100则速率= 400

如果重量= 200则速率= 700


Courierblack - 对于第2卷和第3卷:

如果权重= 100则速率= 800

如果权重= 200则速率= 1100

如果权重= 300然后费率= 1500

~~~样品申请和结果:


例A)用户输入:

卷= 2

重量= 300

output.php必须产生这样的结果:

courier"黄色" = 1200

courier" black" = 1500

例B)用户输入:

音量= 1

重量= 100


output.php必须生成此结果:

courier" yellow" = 600

courier" blue" = 400

解决方案

PHP和ASP非常相似,超出了明显的语法

差异。我使用Codecharge Studio http://www.codecharge.com/?906

在ASP和PHP之间来回切换,没有任何问题,尽管

拥有所有ASP并且没有PHP经验。好吧,除了记得使用

之外,还有;。结束我的PHP行;-)


就个人而言,这些天我倾向于PHP,因为似乎有一个更广泛的社区支持它。


" Jeb Hunter" < JE ******* @ mail.com>在消息新闻中写道:< cb ******************** @ comcast.com> ...

就我个人而言,我倾向于PHP这些天只是因为似乎有一个更广泛的支持社区。


我认为你的意思是一个更广泛的免费社区。 ASP背后有一个巨大的行业价值b / b
,有数百万人用它编程,但它的全部价格都很高。我印象深刻的是,当我打开

报纸并查看想要的广告时,有几个请求ASP

而且没有PHP的请求。然而,如果你去寻求建议,很容易找到
吨的免费建议和免费的PHP代码。使用ASP,没有人会收取

的建议而不收费。


lawrence写道:

" Jeb Hunter" ; < JE ******* @ mail.com>在消息新闻中写道:< cb ******************** @ comcast.com> ...

就个人而言,这些天我倾向于PHP,因为似乎有更广泛的支持社区。

我认为你的意思是更广泛的免费社区。 ASP背后有一个巨大的产业,数以百万计的人用它编程,但它的全部都是高价。我印象深刻的是,当我打开
报纸并查看想要的广告时,有几个请求ASP
而没有PHP请求。然而,如果你去寻求建议,很容易找到大量的PHP免费建议和免费代码。使用ASP,没有人可以在不收费的情况下给出建议。




作为以前的ASP编码器切换到PHP我会反驳这一点。

有一个非常强大的usenet社区支持ASP和许多MVP

加盖ASP相关的网站和教程。工作情况非常真实

然而 - 不幸的是。我原本被聘为ASP程序员

并按下我的公司进行切换,但我经常感觉好像

我是少数几个在那里工作的人之一。


J


Hi all!

I would to study a web programming language to create a PHP script
(output.php) that, given the following
input page (input.htm) where the user select the weight and volume of a
package to be shipped, returns the prices of various couriers ("yellow",
"blue" and "black").
Really is PHP my best choice? ASP is much more complicated? and what about
Perl?

~~~ input page input.htm:

<form method="GET" action="output.php" name="input">

SELECT THE VOLUME OF YOUR PACKAGE:

<input type="radio" name="volume" value="1"> from 0 to 1 m3
<input type="radio" name="volume" value="2"> from 1 to 2 m3
<input type="radio" name="volume" value="3"> from 2 to 3 m3

<br>SELECT THE WEIGHT OF YOUR PACKAGE:

<input type="radio" name="weight" value="100"> from 0 to 100 Kg
<input type="radio" name="weight" value="200"> from 100 to 200 Kg
<input type="radio" name="weight" value="300"> from 200 to 300 Kg

</form>

~~~ istructions to be integrated in the "output.php" script:

Courier "yellow" - for volume 1, 2 and 3:
if weight=100 then rate=600
if weight=200 then rate=900
if weight=300 then rate=1200

Courier "blue" - for volume 1 and 2:
if weight=100 then rate=400
if weight=200 then rate=700

Courier "black" - for volume 2 and 3:
if weight=100 then rate=800
if weight=200 then rate=1100
if weight=300 then rate=1500
~~~ sample request and result:

Example A) With the user input:
volume=2
weight=300

output.php must generate this result:
courier "yellow" = 1200
courier "black" = 1500
Example B) With the user input:
volume=1
weight=100

output.php must generate this result:
courier "yellow" = 600
courier "blue" = 400

解决方案

PHP and ASP are really quite similar, beyond the obvious syntactic
differences. I use Codecharge Studio http://www.codecharge.com/?906 and
switch back and forth between ASP and PHP with no trouble at all, despite
having all ASP and no PHP experience. Well, except for remembering to use
the ";" to end my PHP lines ;-)

Personally, I lean towards PHP these days just because there seems to be a
broader community of support for it.


"Jeb Hunter" <je*******@mail.com> wrote in message news:<cb********************@comcast.com>...

Personally, I lean towards PHP these days just because there seems to be a
broader community of support for it.



I assume you mean a broader free community. There is a huge industry
behind ASP, and millions of people programming with it, but its all
high dollar. I''m impressed with the fact that when I open the
newspaper and look at the want ads there are several requests for ASP
and none for PHP. Yet if you go looking for advice, it is easy to find
tons of free advice and free code for PHP. With ASP, no one gives
advice without charging for it.


lawrence wrote:

"Jeb Hunter" <je*******@mail.com> wrote in message news:<cb********************@comcast.com>...

Personally, I lean towards PHP these days just because there seems to be a
broader community of support for it.


I assume you mean a broader free community. There is a huge industry
behind ASP, and millions of people programming with it, but its all
high dollar. I''m impressed with the fact that when I open the
newspaper and look at the want ads there are several requests for ASP
and none for PHP. Yet if you go looking for advice, it is easy to find
tons of free advice and free code for PHP. With ASP, no one gives
advice without charging for it.



As a former ASP coder that made the switch to PHP I''d refute this.
There is a very strong usenet community standing behind ASP and many MVP
stamped ASP related sites and tutorials. The job situation is very real
however -- unfortunatly. I was originally hired as an ASP programmer
and press-ganged my company into making the switch but I often feel like
I am one of the few actually salaried out there.

J


这篇关于PHP是更简单的Web编程语言吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆