2008-7-20 11:20
lasvegas
ZF的小问题
刚开始接触ZF,遇到几个小问题,不知道如何是好?
目录结构如下:
http://localhost
application---+---controllers +--indexController.php
+--userController.php
+---views-scripts-index+--index.phtml
+--test.phtml
+user----index.phtml
+---models
html-----------index.php
library-----Zend framework 目录
调用http://localhost/html 可以
不能调用
http://localhost/html/index
http://localhost/html/index/test
那里的问题?是apache,php配置的问题,还是ZF问题
http://localhost/html/index.php/user可以调用
index.php
<php>
<?php
// 路径设置
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.'../library');
require_once "Zend/Loader.php";
Zend_Loader::loadClass('Zend_Controller_Front');
......
</php>
indexController.php
[php]
<?php
require_once 'Zend/Controller/Action.php';
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
//todo
}
public function testAction()
{
}
}
?>
</php>