I am a beginner in php and I have just come into contact with the zendframework2 framework. One problem that has always plagued me is that every time I create a zend2 project, to the apache server http-vhosts.conf to write a few lines similar to the following code: {code ...} this makes me very troubled... I am a beginner in php and I have just come into contact with the zend framework2 framework. One problem that has always plagued me is that every time I create a zend2 project, to the apache server http-vhosts.conf to write a few lines similar to the following code:
ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "D:/Program Files/xampp/htdocs/project/php" ServerName php SetEnv APPLICATION_ENV development ErrorLog "logs/php.com-error.log" CustomLog "logs/php.com-access.log" common
This left me a lot of trouble. Do you have some convenient solutions? You can run a project on zend studio, instead of creating a virtual path every time, repeat the following code.
I hope to understand cainiao's ignorance and I am grateful!
PS: I used zend studio for development and also used it for zend2 project creation. The server uses the apache local server.
Reply content:
I am a beginner in php and I have just come into contact with the zend framework2 framework. One problem that has always plagued me is that every time I create a zend2 project, to the apache server http-vhosts.conf to write a few lines similar to the following code:
ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "D:/Program Files/xampp/htdocs/project/php" ServerName php SetEnv APPLICATION_ENV development ErrorLog "logs/php.com-error.log" CustomLog "logs/php.com-access.log" common
This left me a lot of trouble. Do you have some convenient solutions? You can run a project on zend studio, instead of creating a virtual path every time, repeat the following code.
I hope to understand cainiao's ignorance and I am grateful!
PS: I used zend studio for development and also used it for zend2 project creation. The server uses the apache local server.
This is the configuration of apache httpd-vhosts.
The key is to understand DocumentRoot and ServerName.
Point ServerName to 127.0.0.1 In the hosts file and you will be able to access your project through ServerName.
PhpStorm is recommended as an IDE.