本文整理匯總了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);
}