Zend FrameWork 2专辑教程错误:出现404错误,页面未找到


Zend FrameWork 2 Album tutorial Error : A 404 error occurred Page not found

我按照下面的教程来实现[骨架应用程序][1]。

我复制粘贴了教程中提供的所有代码,但我得到以下错误:

出现404错误

页面未找到。

请求的URL无法被路由匹配。

No Exception available

我已经在StackOverflow中交叉检查了所有类似的问题,但没有一个能够解决我的问题。

有谁能帮我一下吗?

请查看下面的代码:

C:'wamp64'www'zend'module'Album'Module.php

<?php
namespace Album;
use Album'Model'AlbumTable;
class Module
{
    public function getAutoloaderConfig()
    {
        return array(
            'Zend'Loader'ClassMapAutoloader' => array(
                __DIR__ . '/autoload_classmap.php',
            ),
            'Zend'Loader'StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }
    public function getServiceConfig()
    {
        return array(
            'factories' => array(
                'Album'Model'AlbumTable' =>  function($sm) {
                    $dbAdapter = $sm->get('Zend'Db'Adapter'Adapter');
                    $table = new AlbumTable($dbAdapter);
                    return $table;
                },
            ),
        );
    }    
    public function getConfig()
    {
        return include __DIR__ . '/config/module.config.php';
    }
}

C: ' wamp64模块' www ' zend ' ' ' config ' module.config.php专辑

<?php
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',
        ),
    ),
);

是否有一种方法在zend做一个调试在哪里发生的问题?

。Htaccess文件包含以下代码

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

vhost如下

<VirtualHost *:80>
    ServerName zend
    DocumentRoot c:/wamp64/www/zend/public
    <Directory  "c:/wamp64/www/zend/public/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

主机设置为

127.0.0.1       zend

我正在尝试访问下面的链接

http://zend/album

C: ' wamp64 ' www ' zend ' config ' modules.config.php

return [
    'Zend'Router',
    'Zend'Validator',
    'Application',
    'Album',
];

这是由于缓存。

刚刚在C:'wamp64'www'zend'config'application.config.php

'config_cache_enabled' => false,
'module_map_cache_enabled' => false