Developing within the Htdocs folder
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?
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.
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.
精彩评论