这是错误:别名 “custom.controllers.ExampleController.php” 无效
Alias "custom.controllers.ExampleController.php" is invalid. Make sure it points to an existing PHP file and the file is readable.
我的代码下面给出
main.php=>
return
array(
'controllerMap' => array(
'product' => array(
'class' => 'custom.controllers.Product.php',
),
),
'import' => array(
'custom.mycompany.*',
),
'components' =>
array(
'widgetHandler' => array(
//Load a component
'class' => 'custom.mycompany.mywidget.mywidget',
),
)
);
Product.php=>
<?php
class Product extends Controller
{
public function actionIndex()
{
echo "this is the default index function";
}
public function actionTest()
{
echo "This is the test function";
}
}
我使用光速厘米。
谢谢你的帮助 –