无法访问自定义的zend controller,望前辈指教!
访问地址: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>