我有这个代码。
$contrl = stripslashes($this->params['controller'].'Controller'); //PostController
$obj = new $contrl(); // What's won't work
//this don't work too
$contrl = 'PostController';
$obj = new $contrl();
//but this work good
$obj = new PostController();
我不明白为什么会发生这种情况以及如何解决?