<?php
class ReportsController extends CController
{
public function __call($name,$argument)
{
echo "test";
}
}
?>
這是我的Yii控制器類和調用index.php?r=reports/test
URL時,它必須調用__call
方法,測試方法是不存在的,但它給錯誤The system is unable to find the requested action test
錯誤。當嘗試調用yii控制器中不存在的函數時,__call方法不會被執行?
我想這和它的作品很好!!!!!!!!!!!謝謝 –