简体   繁体   English

“与MySQL结合使用的PHP是跨平台的(您可以在Windows中开发并在Unix平台上提供服务)”的确切含义是什么?

[英]What exactly mean by “PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)”?

I'm learning PHP and I come across the below sentence : 我正在学习PHP,遇到以下句子:

PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform) 与MySQL结合使用的PHP是跨平台的(您可以在Windows中开发并在Unix平台上使用)

I could not understand the exact meaning of cross-platform in this sentence. 我无法理解这句话中跨平台的确切含义。

As per my knowledge the environment where PHP is combined MySQL can be set on any platform(like Windows, Linux, Unix, Mac OS X, etc.) and development can be done. 据我所知, 结合PHP的环境可以在任何平台(如Windows,Linux,Unix,Mac OS X等)上设置MySQL ,并且可以完成开发。

When user accesses the website that is developed in an environment where PHP is combined MySQL from any environment(like Windows, Linux, Unix, Mac OS X, etc.) through the web browser present in the respective environment, it's accessible. 当用户通过各自环境中存在的Web浏览器访问在PHP与任何环境(例如Windows,Linux,Unix,Mac OS X等) 结合MySQL的环境中开发的网站时,就可以访问该网站。

Then where the concern of other environment is there? 那么,其他环境的担忧又在哪里呢? The web application is accessed through web browser only. 该Web应用程序只能通过Web浏览器访问。

Can the same thing happen when PHP is combined with some other database like MongoDB, Oracle, SQLServer or anything else? 当PHP与MongoDB,Oracle,SQLServer或其他任何其他数据库结合使用时,会发生同样的事情吗?

The point is that you may want to have more than one environment where PHP and Mysql are combined. 关键是您可能希望拥有多个将PHP和Mysql结合在一起的环境。 At a minimum you probably want a Dev environment where you write the code and do initial tests, and a production environment where you put a copy of the code once your satisfied with it so that real users can connect to it. 至少您可能需要一个开发环境,在其中编写代码并进行初始测试,在生产环境中,对满意的代码放入一个副本,以便真正的用户可以连接到它。

Because PHP and MySQL are cross platform, your Dev and production environments don't have to run the same os. 由于PHP和MySQL是跨平台的,因此您的开发环境和生产环境不必运行相同的操作系统。 Your Dev environment could be a pc running Windows, and production could be a server running Linux. 您的开发环境可以是运行Windows的PC,生产环境可以是运行Linux的服务器。

However a few things work differently on different operating systems, so there are advantages to making Dev and Live use the same os and generally be as similar as possible. 但是,在不同的操作系统上,有些事情会有所不同,因此使Dev和Live使用相同的操作系统并通常尽可能地相似是有优势的。

It just means that the PHP script is cross-platform (do not depends on the ENV OS) as long as all necessary software exists on ENV. 这仅表示PHP脚本是跨平台的(不依赖于ENV OS),只要ENV上存在所有必需的软件即可。 It is very rare situation when web project use 3-rd party libraries which depends on specific OS). 当Web项目使用取决于特定OS的第三方库时,这种情况非常罕见。 So PHP and MySQL variation are only an example (you can use any DB server). 因此,PHP和MySQL的变化仅仅是一个示例(您可以使用任何数据库服务器)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM