在 Htdocs 文件夹中开发
直接在 htdocs 文件夹中开发 php 网站是否被认为是最佳实践? 显然,优点是您可以快速编辑、导航到本地主机并立即查看结果。
当从 Visual Studio 开发 ASP.NET 应用程序时,我们通常从“开发文件夹”将更改发布到 IIS,并且通常不会直接在“inetpub”本身中进行开发。是否有类似的 php 开发或在 htdocs 中开发就可以了?
Is it considered best practice to develop your php website directly within the htdocs folder?
The advantages, obviously, are that you can make a quick edit, navigate to localhost and instantly view the result.
When developing ASP.NET applications from visual studio, we usually publish our changes to IIS from the "development folder" and don't usually develop directly within 'inetpub' itself. Is there something similar for php development or developing within htdocs is just fine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只要“htdocs”文件夹位于测试服务器上(或者至少是测试文件夹,如果您没有测试服务器),通常就认为没问题。就像你说的,它提供了更即时的反馈。
对于 ASP,有更好的解决方案,就像您已经说过的那样。
As long as the 'htdocs' folder is on a test server (or at least test folder, if you don't have a test server), it's generally considered fine. Like you say, it provides a more instant feedback.
For ASP, there are better solutions, like you have already stated.
我们公司这样做已经有10年了。没有什么不好的事情发生。
正如我们所看到的,phpeclipse、zend studio 和 Myeclipse(用于 java web 应用程序)都使用这种方法。毕竟我们需要一个Web服务器来测试和调试,并且需要版本控制下的文件夹,两者没有冲突,很方便。
Our company have done like this for 10 years. Nothing bad happened.
As we can see, phpeclipse, zend studio, and Myeclipse (for java web apps) are all using this kind of approach. After all, we need a web server to test and debug, and the folder under version control, the two have nothing conflict, it's convenient.