本文整理汇总了PHP中ossim_db::phpgacl_connect方法的典型用法代码示例。如果您正苦于以下问题:PHP ossim_db::phpgacl_connect方法的具体用法?PHP ossim_db::phpgacl_connect怎么用?PHP ossim_db::phpgacl_connect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossim_db
的用法示例。
在下文中一共展示了ossim_db::phpgacl_connect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_phpgacl_install
function check_phpgacl_install()
{
global $gacl;
$db_table_prefix = $gacl->_db_table_prefix;
require_once "ossim_db.inc";
$db = new ossim_db();
if (!($conn = $db->phpgacl_connect())) {
echo "<p align=\"center\">\n <b>Can't connect to OSSIM acl database (phpgacl)</b><br/>\n Check for phpgacl values at framework configuration\n </p>";
exit;
}
$query1 = OssimQuery("SELECT * FROM acl");
$query2 = OssimQuery("SELECT * FROM " . $db_table_prefix . "_acl");
if (!$conn->Execute($query1) and !$conn->Execute($query2)) {
echo "\n <p align=\"center\"><b>You need to configure phpGACL</b><br/>\n Remember to setup the database connection at phpGACL config files!\n <br/>\n Click <a href=\"/phpgacl/setup.php\">here</a> to enter setup\n </p>\n ";
exit;
}
$db->close($conn);
}