Tag: APEX的

通过虚拟主机configuration设置Application_ENV并在PHP中读取

我喜欢这在Zend Framework中如何工作。 我可以通过在我的控制器中检查APPLICATION_ENV常量来知道我当前正在使用哪个环境。 <VirtualHost *:80> #ServerName #DocumentRoot SetEnv APPLICATION_ENV "development" # Directory </VirtualHost> 但不幸的是我不能在我目前的项目中使用ZF。 我如何检查我的PHP代码中的这个环境variables?

如何在XAMPP上创build虚拟主机

我确信这个问题被多次提出,但是我没有遇到一个问题。 我正在使用XAMPP来configurationZend框架。 XAMPP在PORT 8081上运行,因为80正在被一些Windows进程占用,我需要使用虚拟主机,因为我在httpd-vhosts.config中configuration了以下代码,出现在C:/ xampp / apache / config / extra / <VirtualHost *:80> ServerName comm-app.local DocumentRoot "C:/xampp/htdocs/CommunicationApp/public" SetEnv APPLICATION_ENV "development" <Directory "C:/xampp/htdocs/CommunicationApp/public" DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 并用127.0.0.1 comm-app.local更新hosts文件,并尝试重新启动apache,但显示错误。 15:03:01 [Apache] Error: Apache shutdown unexpectedly. 15:03:01 [Apache] This may be due to a blocked port, missing dependencies, 15:03:01 […]