我是zend框架的新手,我正在尝试配置zend。我成功地安装zendskeleton广告应用程式上窗口7和XAMPP页面找不到请求url在zend 2框架应用
安装完毕后,我创造新的模块专辑按照用户指南定义。我是根据指南制作所有代码和页面,但在此之后,我可以打开专辑模块。我没有找到404错误。
这里代码
application.config
return array( 'modules' => array( 'Application','Album', ), 'module_paths' => array( './module', './vendor', ), 'config_glob_paths' => array( 'config/autoload/{,*.}{global,local}.php', ), ), );
module.config
return array( 'controllers' => array( 'invokables' => array( 'Album\Controller\Album' => 'Album\Controller\AlbumController', ), ), 'router' => array( 'routes' => array( 'album' => array( 'type' => 'segment', 'options' => array( 'route' => '/album[/][:action][/:id]', 'constraints' => array( 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', 'id' => '[0-9]+', ), 'defaults' => array( 'controller' => 'Album\Controller\Album', 'action' => 'index', ), ), ), ), ), 'view_manager' => array( 'template_path_stack' => array( 'album' => __DIR__ . '/../view', ), ), );
Module.php
的httpd-vhosts.conf
<VirtualHost *:81> ServerName zf2-tutorial.localhost DocumentRoot "C:/xampp\htdocs/ZendSkeletonApplication/ZendSkeletonApplication-master/public" SetEnv APPLICATION_ENV "development" <Directory C:/xampp\htdocs/ZendSkeletonApplication/ZendSkeletonApplication-master/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
主机条目在SYSTEM32
127.0.0.1:8081 zf2-tutorial.localhost
我该如何处理它。 谢谢
我打电话给url http://zf2-tutorial.localhost/album,但浏览器无法识别它...查看上面的更新 –
它看起来像没有''.htaccess''文件甚至''ModRewrite' '不打开 – ins0
'zf2-tutorial.localhost'也不能正常工作..其中'.htaccess'必须放? ,并在'http.config'我已经打开'ModRewrite' –