为什么php而不是C? [英] Why php and not C?

查看:100
本文介绍了为什么php而不是C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我第一次开始进行网络编程时(我离开它的时间超过了几年),我用C和一点perl编写了我的网页。现在我需要回到网络编程,我发现php已经全部为

愤怒了。


但是看着一个PHP的语法我不能不知道它是非常喜欢的,

这并不奇怪。


但我不知道,除了php中没有指针(不是坏事

我承认!)以及php执行变量的难易程度,没有

打字,为什么它似乎没有一个是用C编程网页吗?


C它似乎具有已建立的语言的优势,对服务器来说是一种非常好的b $ b本地语言并且它编译可执行文件。


为什么php获得立足点并起飞?

When I first started in web programming (I left it for more than a few
years) I programmed my web pages in C and a little perl. Now that I
have a need to come back to web programming I find that php is all the
rage.

But looking a php syntax I can''t help but notice it is very C like,
which is no surprise.

But I wonder, other than the lack of pointers in php (not a bad thing
I admit!) and the ease in which php does variables, litte to no
typing, why does it seem that no one is programming the web in C?

C it would seem had the advantage of an established language, a very
native language for the servers and it compiles down to executable.

Why did php gain a foothold and take off?

推荐答案

PHP很简单,通用,快速,并且具有几乎所有功能...


在C中,它很容易出现内存泄漏,这很难(与PHP相比) />
无论如何),它有点矫枉过正,也可能无法继续运行任何服务器/操作系统......


现在,有人使用C / C ++,但它有更多的缺点而不是好处..


-

// DvDmanDT

MSN:dvdmandt¤hotmail.com

邮箱:dvdmandt¤telia.com

鲍勃 < CL **** @ qualitythink.com> skrev i meddelandet

新闻:cf ************************** @ posting.google.c om ...
PHP is easy, common, fast and has functions for almost everything...

In C, it''s really easy to get memory leaks, it''s hard (compared to PHP
anyway), and it''s overkill, as well as it might not run on any server/OS...

Now, there are ppl using C/C++, but it has more downsides than upsides..

--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
"Bob" <cl****@qualitythink.com> skrev i meddelandet
news:cf**************************@posting.google.c om...
当我第一次开始进行网络编程时(我离开了几年多)我用C语言编写了一些网页。既然我需要回到网络编程,我发现php已经完全没什么了。

但是看一下php语法我不能不注意它非常喜欢,
这并不奇怪。

但我想知道,除了缺少PHP中的指针(不是坏事,我承认!)和很容易让php做变量,没有打字,为什么似乎没有人用C编写网页?

C它似乎有一个既定语言的优势,服务器的非常本地语言,它编译成可执行文件。

为什么php获得立足点并起飞?
When I first started in web programming (I left it for more than a few
years) I programmed my web pages in C and a little perl. Now that I
have a need to come back to web programming I find that php is all the
rage.

But looking a php syntax I can''t help but notice it is very C like,
which is no surprise.

But I wonder, other than the lack of pointers in php (not a bad thing
I admit!) and the ease in which php does variables, litte to no
typing, why does it seem that no one is programming the web in C?

C it would seem had the advantage of an established language, a very
native language for the servers and it compiles down to executable.

Why did php gain a foothold and take off?



Bobaécritle25/01/2004:
Bob a écrit le 25/01/2004 :
当我第一次开始进行网络编程时(我离开它超过几年)我编写了我的网页在C和一点perl。既然我需要回到网络编程,我发现php已经完全没什么了。

但是看一下php语法我不能不注意它非常喜欢,
这并不奇怪。

但我想知道,除了缺少PHP中的指针(不是坏事,我承认!)和很容易让php做变量,没有打字,为什么似乎没有人用C编写网页?

C它似乎有一个既定语言的优势,服务器的非常本地语言,它编译成可执行文件。

为什么php获得立足点并起飞?
When I first started in web programming (I left it for more than a few
years) I programmed my web pages in C and a little perl. Now that I
have a need to come back to web programming I find that php is all the
rage.

But looking a php syntax I can''t help but notice it is very C like,
which is no surprise.

But I wonder, other than the lack of pointers in php (not a bad thing
I admit!) and the ease in which php does variables, litte to no
typing, why does it seem that no one is programming the web in C?

C it would seem had the advantage of an established language, a very
native language for the servers and it compiles down to executable.

Why did php gain a foothold and take off?




如何在HTML语法中轻松集成?代码的可移植性




what about the ease of integration in HTML syntax? the portability of
the code?


只需比较开发访问数据库的cgi应用程序所需的时间

并将结果集作为用C语言编写的html返回到开发

类似于PHP的时间。


有你的答案。

..soma
Just compare the time it takes to develop a cgi app that accesses a database
and returns a resultset as html written in C to the time it takes to develop
something similar in PHP.

There''s your answer.
..soma


这篇关于为什么php而不是C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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