我想从 ACL 插件中的数据库加载资源
我这样做
class My_ACL extends Zend_Acl {
protected $_role_id;
protected $_userResource;
public function __construct() {
try {
$db = Zend_Db_Table::getDefaultAdapter();
$stmt = $db->query("CALL getUserPrivileges(?)", 998877445);
//Returns an array containing all of the result set rows
$rows = $stmt->fetchAll();
$stmt->closeCursor();
print_r($rows);
return $rows;
} catch (Exception $e) {
echo 'error ' . $e;
}
}
但这不起作用,因为呈现了白页并且没有打印出来!