Wamp Server 与普通的互联网托管提供商有何不同?

发布于 2024-11-01 22:57:55 字数 283 浏览 1 评论 0原文

我正在使用 wamp 服务器来开发一个使用 php、mysql、PDO、html 和 css 的网站。

我的 wamp 服务器使用 PHP 5.3.5、MySQL 5.5.8 和 Apache 2.2.17,我还使用 InnoDB 进行事务。

考虑到我的互联网托管提供商至少有这些版本的 php、mysql、apache,并且支持 InnoDB,我构建的网站将以完全相同的方式运行。

是否有可能在 wamp 中设计一个网站,然后在上线时出现一些错误?如果是的话,如何克服这个问题?

谢谢。

I am using wamp server to develop a website using php, mysql, PDO, html and css.

My wamp server is using PHP 5.3.5, MySQL 5.5.8 and Apache 2.2.17, I am also using InnoDB for transactions.

Considering that my internet hosting provider has at least these versions of php, mysql, apache, and supports InnoDB will the website I build act in the exact same way.

Is it possible to design a website in wamp and then expect several errors when going live? And if so how is this overcome?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

赠佳期 2024-11-08 22:57:55

正如其他人指出的那样,存在许多潜在的问题(但我将其视为学习机会。)但我已经这样做了五年多,但尚未找到难以克服的差异。只需坚持中间路线,尽可能多地使用默认值,并享受乐趣。这是探索该平台的好方法。

As others note, there are many potential hiccups (but I view them as learning opportunities.) But I've done it this way for over five years and have yet to find a difference that wasn't easily overcome. Just stick to the middle of the road, use defaults as much as makes sense, and have fun. It's a great way to explore the platform.

灰色世界里的红玫瑰 2024-11-08 22:57:55

有很多事情可能会出错,其中大多数与 Web 服务器和 PHP 的构建和配置方式有关。

最简单的例子就是PHP的安全模式:安全模式有很多东西不允许,并且如果您位于共享主机上,则可能无法关闭它。另一个例子是 PHP 中启用了哪些扩展(您的应用程序可能需要主机没有的扩展)。

当然,如果您租用整个服务器(或虚拟机),那么这一切都是没有意义的,因为在这种情况下您将能够做任何您想做的事情。

为了完整起见,我必须提到,由于同一个库(PHP 用于提供某些功能)在不同平台上编译成不同的行为,可能会导致特定于平台的行为差异(想想 C 中使用 #ifdef 进行的平台嗅探) )。我以前也被这个问题困扰过,但是可能性还没有大到可以提前担心的程度。

There are many things that can go wrong, most of them having to do with how the web server and PHP are built and configured.

The simplest example is PHP's safe mode: there are many things that safe mode does not allow, and turning it off may not be an option if you are on a shared host. Another example is which extensions are enabled in PHP (your app may require one which the host does not have).

Of course this is all moot if you rent the whole server (or a VM), as in this case you will be able to do whatever you please.

For completeness, I have to mention that there might be platform-specific differences in behavior resulting from the same library (which PHP uses to provide some functionality) compiling into different behavior on different platforms (think platform sniffing in C with #ifdef). I have been bitten by this in the past, but the possibility is not large enough to worry about it beforehand.

泪痕残 2024-11-08 22:57:55

正如乔恩所说,许多问题可以通过将常量移入配置文件来解决。有些问题将难以控制并且更难以诊断。例如,输出缓冲区控制可能在您有权访问的 DocumentRoot 之外进行不同的配置到。当您尝试在其他内容已发送出去的情况下写出标头时,这可能会导致混乱的问题。超时数字等类似问题。

A lot of the issues can be worked around by moving constants into config files, like Jon says. Some issues will be less in your control and harder to diagnose. For instance, the output buffer control may be configured differently outside the DocumentRoot you have access to. This can cause confusing problems when you try to write headers out when other content has already been sent out. Similar issues with the timeout numbers, etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文