无法访问自定义的zend controller,望前辈指教!

parkjun1984 2010-10-25 02:57:44
访问地址:park.loc/php/test
问题:无法找到该网页

zf是1.10
php是5.2
apache2.2

我还有两个controller是IndexController和ErrorController,分别都能访问到。

---------------------------------------------------------------------------

httpd.conf

alias /php/ "e:/project/zend/blog/www/"

<Directory "e:/project/zend/blog/www/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

====================================

.hcaccess

RewriteEngine on

RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php

==================================
www/index.php


<?php
require_once 'zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);

$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory('../controllers');
$front->setBaseUrl('/php/');
$front->dispatch();
?>

========================================
controllers/TestController.php


<?php

class TestController extends Zend_Controller_Action {

public function indexAction() {
echo 'test action';
}
}

?>
===========================================
views/scripts/test/test.phtml


<html>
<head>
<title>test</title>
</head>
<body>

<h1>test</h1>

</body>
</html>
...全文
171 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

4,250

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧