【问题标题】:Unable to see my recently installed sticky notes module in zend 2 in action无法在 zend 2 中看到我最近安装的便签模块
【发布时间】:2014-05-13 17:39:22
【问题描述】:

伙计们,

最近我安装了这个 zend 2 扩展“http://bigemployee.com/zend-framework-2-simple-web-application-crud-using-ajax-tutorial/”,但我无法看到每次调用默认的“应用程序”模块时似乎都在起作用。不管在“application.config.xml”中声明这个便笺。 php”。

我需要说明几点: 1. 我创建了这个路径“/var/www/ZendSkeletonApplication/public”作为我的文档根目录,这样我就可以通过使用“localhost/stickynotes”访问文件 index.php 但每次调用模块应用程序的 index.phtml 文件时,这意味着它始终只指向该应用程序模块。 看到这个网址“http://grab.by/w6jW”。

  1. 我相信我必须将我的“便笺”模块指向“localhost/sticknotes/stickynotes”,但它显示的是 404。

我的配置似乎都是正确的。就像在“application.config.php”中一样,我已经将它设置为 '模块' => 数组( '应用', '便利贴', ),

任何帮助将不胜感激。

【问题讨论】:

  • 配置是否被缓存?默认情况下,application.config.php 中启用了配置缓存。 (确保 'config_cache_enabled' 和 'module_map_cache_enabled' 的值为 false,并删除 'data/cache' 中的任何 *.php 文件)

标签: php zend-framework2


【解决方案1】:

这取决于您如何定义虚拟主机。

您提到了 - “i have created this path "/var/www/ZendSkeletonApplication/public" as my document root 并使用 URL localhost/stickynotes 访问 index.php

所以你的主文件夹是“ZendSkeletonApplication”,并且有一个名为“stickynotes”的模块。

没有虚拟主机 - 网址将是http://localhost/ZendSkeletonApplication/public/stickynotes

使用虚拟主机 - 虚拟主机定义中肯定有提到ServerName _SOME_SERVER_NAME

例如: <VirtualHost *:80> ServerName _SOME_SERVER_NAME DocumentRoot "/var/www/ZendSkeletonApplication/public" [.....] [...] </VirtualHost>

所以这里的网址是http://_SOME_SEVER_NAME/stickynotes

我希望它对某人有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-09-28
    • 1970-01-01
    • 2023-02-07
    • 2022-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多