在WAMP上为LAMP开发是否愚蠢? [英] Is it dumb to develop for LAMP on WAMP?

查看:75
本文介绍了在WAMP上为LAMP开发是否愚蠢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

成为有点疏远的开源人员,并花了几年时间在ASP.Net中开发Web应用程序之后,我将开始进行大量的PHP/MySQL开发.

After becoming somewhat estranged open source, and spending some years developing web applications in ASP.Net, I'm going to start doing quite a lot of PHP / MySQL development.

我已经非常轻松地安装了 WampServer ,以在Windows机器上启动并运行开发环境,但是我将针对的平台很可能是Linux.所以我的问题是,由于在针对Linux的同时在Windows上进行开发,我是否可能会遇到问题?是否建议进行投资以获取用于开发我的LAMP应用程序的Linux环境设置?

I've quite painlessly installed WampServer to get a development environment up and running on my Windows machine, but the platform I'll be targeting will most likely be Linux. So my question is, am I likely to run into problems due to developing on Windows while targeting Linux? Is it advisable to invest in getting a Linux environment setup in which to develop my LAMP apps?

推荐答案

如果可以的话,我将投资某种类型的linux或至少* nix开发环境.对于简单的应用程序和网站,您的设置很好,但部署时最终会遇到细微的差异.

If you can I'd invest in some kind of linux, or at least *nix, development environment. For simple applications and website your setup is fine, but you will eventually run into subtle differences when you deploy.

如果坚持使用Windows环境,这里有些事情要引起我的注意.

Here are some things off the top of my head you'll want to watch out for if you stick with your Windows environment.

  1. 文件路径.许多PHP函数将文件路径作为参数.请勿使用Windows反斜杠()分隔符.即使您在Windows上,PHP也会允许您使用正斜杠分隔符.理想情况下,使用您自己的文件路径类将其抽象出来.

  1. File paths. A lot of PHP functions take file paths as arguments. Do NOT use the windows backslash () separator. Even though you're on windows PHP will let you use a forward slash separator. Ideally abstract this away with your own file path class.

Apache模块,PECL扩展.默认情况下,Apache Windows和Apache Unix通常带有一组不同的Apace模块.同样,相同版本的模块可能在不同平台上以不同方式运行.如果您的应用程序依赖于 any apache模块,请确保它在两个平台上均可用. PHP自定义扩展(PECL)也是如此

Apache Modules, PECL Extensions. Apache Windows and Apache Unix often come with a different set of Apace Modules installed by default. Also, the same version of a module may run differently on a different platform. If your application relies on any apache module, make sure it's available for both platforms. Same goes for PHP custom extensions (PECL)

流程派生.首先,在网络应用程序中使用exec,`等不是一个好主意,但是如果您使用这些功能,则它们在Windows和* nix

Process Forking. Using exec, `, etc. in a web app is a bad idea to begin with, but if you're using these functions they're going to behave differently between windows and *nix

文件写入,锁定等工作原理不同

File Writing, Locking, etc. works different

两个平台上的电子邮件处理方式不同

Email is handled differently on both platforms

用于Windows的PHP组的代码词是某些平台".您可以自己研究更多的 如果您愿意

The PHP group's code word for Windows is "some platforms". You can research more on your own if you'd like

通常,开发环境与生产环境越接近,与环境/部署相关的问题就越少.

In general, the closer your development environment matches your production environment, the less environment/deployment related issues you'll have.

希望有帮助!

这篇关于在WAMP上为LAMP开发是否愚蠢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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