域名服务器?为什么? [英] Nameservers? Why?

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

问题描述

我仍然不明白使用域名服务器。因为PHP没有对它们的支持而一直在进行的大惊小怪仍然不清楚

我。具有相同名称的函数和类,但在不同的
容器上?它有用的是什么?除了在MySQL名称空间中使用所有MySQL函数

,在另一个函数库中使用SQLite等等...我再也看不到

使用。

I still don''t get the point of using nameservers. The fuss that''s been
going on because PHP didn''t have support for them is still unclear to
me. Having functions and classes with the same names, but on different
containers? What is it useful for? Besides having all MySQL functions
in a MySQL namespace, SQLite on another, etc... I don''t see further
uses.

推荐答案

2007年9月27日星期四03:02:46 +0200,RageARC< ra ***** @ gmail.comwrote:
On Thu, 27 Sep 2007 03:02:46 +0200, RageARC <ra*****@gmail.comwrote:

我还没有明白使用域名服务器。因为PHP没有对它们的支持而一直在进行的大惊小怪仍然不清楚

我。具有相同名称的函数和类,但在不同的
容器上?它有用的是什么?除了在MySQL名称空间中使用所有MySQL函数

,在另一个函数库中使用SQLite等等...我不会再看到

使用。
I still don''t get the point of using nameservers. The fuss that''s been
going on because PHP didn''t have support for them is still unclear to
me. Having functions and classes with the same names, but on different
containers? What is it useful for? Besides having all MySQL functions
in a MySQL namespace, SQLite on another, etc... I don''t see further
uses.



名称服务器?我几乎认为你在谈论DNS。


命名空间相反,非常好......它确保了不同的

包和代码可以一起工作,没有大多数问题

冲突功能/类/常量名称。通常在软件包中有类似的

功能,开发人员想象应该调用的东西是有限的(应该是描述性的)。


例如一个名为isError的函数非常常见,不同的

函数在不同的包中具有相同的名称会导致php中致命的

错误。使用命名空间,这不会是一个问题(好吧,只要开发人员意识到他正在使用的命名空间)。


-

Rik Wasmus

Nameservers? I''d almost think you were talking about DNS.

Namespaces on the contrary, are very very good... It ensures different
packages and code can work together, without most of the problems of
clashing function/class/constant names. Often there''s similar
functionality within the packages, and developers imagination of what
something should be called is limited (an should be descriptive).

A function called isError for instance is quite common, different
functions in different packages with the same name would cause a fatal
error in php. With namespaces, it would not be a problem (well, as long as
the developer realizes what namespace (s)he''s working in).

--
Rik Wasmus


9月26日下午6:02,RageARC< rage ... @ gmail.comwrote:
On Sep 26, 6:02 pm, RageARC <rage...@gmail.comwrote:

>

我仍​​然没有明白使用域名服务器。
>
I still don''t get the point of using nameservers.



你的意思是,命名空间? :)

You mean, namespaces? :)


它对什么有用?
What is it useful for?



防止名称冲突。比如说,你需要使用两个第三方

库,每个库都包含一个名为authenticate()的函数。


干杯,

NC

Preventing name collisions. Say, you need to use two third-party
libraries, and each of them contains a function named authenticate().

Cheers,
NC


是的,我在托管mumbo jumbo的网站上思考,我说它是错误的。
错误。 />

所以只有你想使用别人的代码x才有用。这不是值得大惊小怪的。

Yes i was thinking in the website hosting mumbo jumbo and I said it
wrong.

So it is only useful if you want to use others'' codes x). It''s not
even worth the fuss.


这篇关于域名服务器?为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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