本文整理汇总了PHP中UserIdentity::canBrowseServer方法的典型用法代码示例。如果您正苦于以下问题:PHP UserIdentity::canBrowseServer方法的具体用法?PHP UserIdentity::canBrowseServer怎么用?PHP UserIdentity::canBrowseServer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserIdentity
的用法示例。
在下文中一共展示了UserIdentity::canBrowseServer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
// change the following paths if necessary
$yii = $curr . '/yii/framework/yii.php';
$config = $curr . '/protected/config/production.php';
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
} else {
$config = $curr . '/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG', true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
}
require_once $yii;
Yii::createWebApplication($config);
/**
* SET WITH YOUR VALUE ------------------------
* decide your own PATH here
* for description then you need to read kcfinder manual
*/
$uploadURL = Yii::app()->baseUrl . '/..' . Yii::app()->params['fileDownloadPath'];
$uploadDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . Yii::app()->params['fileDownloadPath'];
$session = new CHttpSession();
$session->setSavePath(Yii::app()->session->savePath);
$session->open();
$session['KCFINDER'] = array();
$session['KCFINDER'] = array('disabled' => !UserIdentity::canBrowseServer(), 'uploadURL' => $uploadURL, 'uploadDir' => $uploadDir);
// then back to our path
chdir($current_cwd);
spl_autoload_unregister(array('YiiBase', 'autoload'));
spl_autoload_register('__autoload');
spl_autoload_register(array('YiiBase', 'autoload'));