本文整理匯總了PHP中PMF_Configuration::setLdapConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMF_Configuration::setLdapConfig方法的具體用法?PHP PMF_Configuration::setLdapConfig怎麽用?PHP PMF_Configuration::setLdapConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMF_Configuration
的用法示例。
在下文中一共展示了PMF_Configuration::setLdapConfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: trim
ini_set('session.auto_start', 0);
// Prevent error to use session_start() if it's active in php.ini
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');
//
// Start the PHP session
//
PMF_Init::cleanRequest();
session_start();
//
// Connect to LDAP server, when LDAP support is enabled
//
if ($faqConfig->get('security.ldapSupport') && file_exists(PMF_CONFIG_DIR . '/ldap.php') && extension_loaded('ldap')) {
require PMF_CONFIG_DIR . '/constants_ldap.php';
require PMF_CONFIG_DIR . '/ldap.php';
$faqConfig->setLdapConfig($PMF_LDAP);
} else {
$ldap = null;
}
//
// Build attachments path
//
$confAttachmentsPath = trim($faqConfig->get('records.attachmentsPath'));
if ('/' == $confAttachmentsPath[0] || preg_match('%^[a-z]:(\\\\|/)%i', $confAttachmentsPath)) {
// If we're here, some windows or unix style absolute path was detected.
define('PMF_ATTACHMENTS_DIR', $confAttachmentsPath);
} else {
// otherwise build the absolute path
$tmp = dirname(__DIR__) . DIRECTORY_SEPARATOR . $confAttachmentsPath;
// Check that nobody is traversing
if (0 === strpos((string) $tmp, dirname(__DIR__))) {