#1 littleu
新建了一个 test controller, 代码如下:class test extends spController{
function index() {
echo 'test/index';
}
function test1() {
echo 'test/test1';
}
function test2() {
echo 'test/test2';
}
function test3() {
echo 'test/test3';
}
}
好,现在打开 localhost/test/index, 显示结果没错,是 test/index.
好,现在打开 localhost/test/test1, 显示结果还是 test/index... 地址栏链接确实是 localhost/test/test1;
好,不死心,打开 localhost/test/test2, 显示结果还是 test/index...地址栏链接确实是 localhost/test/test2;
打开 localhost/test/test3, 显示结果还是 test/index...地址栏链接确实是 localhost/test/test3;
为什么会这样?
尝试修改一下 map 配置:
‘map' => array(
'test1' => 'test@test1',
'test2' => 'test@test2',
'test3' => 'test@test3',
)
好,现在访问
localhost/test1, 显示结果 test/test1
localhost/test2, 显示结果 test/test2
localhost/test3, 显示结果 test/test3
但是,如何不修改 map 配置才能正确显示呢?求指导。
2011-03-20 10:05:46