Javascript还是PHP? [英] Javascript or PHP ?

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

问题描述

你好,

在网页开发中,我们应该在客户端(javascript)或服务器端(PHP)进行更多处理吗?

解决方案

完全取决于你的目标。


毕竟当你手持锤子时,你不会用螺丝刀敲钉子到达!


我的意思是,PHP和javascript是完全不同的野兽,作为经验法则,美学代码(DHTML等)由JS处理,其他一切都是PHP恕我直言



你好,


在网页开发中,我们应该在客户端进行更多处理(javascript)或服务器端(PHP)?



这取决于它是什么处理。


如果您的页面必须找到两个数字的乘积,那么这样做在JavaScript中。在这种情况下,PHP会给出缓慢的响应。


如果您的页面向数据库添加或提取一些数据,请使用PHP。单独的JavaScript不会做任何事情。



你好,


在web开发中应该我们在客户端(javascript)或服务器端(PHP)上做更多的处理?



只使用其中一种是不可能的。


使用必须学会使用这两种语言。


Hello,

In web development should we do more processing on client side (javascript) or server side (PHP) ?

解决方案

that entirely depends on what you aim to do.

after all you wouldn''t use a screwdriver to bang in a nail, when you have a hammer in arms reach!

what I mean is, PHP and javascript are quite different beasts, as a rule of thumb, aesthetic code (DHTML etc) is handled by JS everything else is PHP IMHO


Hello,

In web development should we do more processing on client side (javascript) or server side (PHP) ?

That depends upon what processing it is.

If your page has to find product of two numbers, then do that in JavaScript. PHP would give slow response in that case.

If your page adds or fetches some data to the database, use PHP. JavaScript alone won''t do anything.


Hello,

In web development should we do more processing on client side (javascript) or server side (PHP) ?

Using just one or the other isn''t possible.

Use must learn to utilise both these languages.


这篇关于Javascript还是PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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