4
我不能讓它在我的控制器中工作。代碼是:CakePHP清理工具
App::import('Sanitize');
class MyController extends AppController
{
public $uses = array('Sanitize');
function Foo()
{
// Fatal error: Class 'Sanitize' not found
$test = Sanitize::paranoid($data);
// Fatal error: Call to a member function paranoid() on a non-object
$test = $this->sanitize->paranoid($data);
}
}
我錯過了什麼?
你使用哪種版本的CakePHP? – dhofstet 2012-02-18 16:18:34
@dhofstet 2.0.5 – Ockonal 2012-02-18 16:26:29