• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP WindUtility类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中WindUtility的典型用法代码示例。如果您正苦于以下问题:PHP WindUtility类的具体用法?PHP WindUtility怎么用?PHP WindUtility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了WindUtility类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * 初始化安装程序
  */
 public function __construct()
 {
     $this->_appId = 'L000' . time() . WindUtility::generateRandStr(4);
     $this->_config = @(include Wind::getRealPath(self::CONF_PATH, true));
     $this->tmpPath = Wind::getRealPath($this->getConfig('tmp_dir') . '.' . Pw::getTime(), false);
     $this->tmpInstallLog = Wind::getRealPath($this->getConfig('log_dir'), false);
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:10,代码来源:PwInstallApplication.php


示例2: emailAction

 /** 
  * 电子邮件用户激活
  */
 public function emailAction()
 {
     list($page, $perpage) = $this->getInput(array('page', 'perpage'));
     $page = $page ? $page : 1;
     $perpage = $perpage ? $perpage : $this->perpage;
     $count = $this->_getDs()->countUnActived();
     $list = array();
     if ($count > 0) {
         $totalPage = ceil($count / $perpage);
         $page > $totalPage && ($page = $totalPage);
         $result = $this->_getDs()->getUnActivedList($perpage, intval(($page - 1) * $perpage));
         /* @var $userDs PwUser */
         $userDs = Wekit::load('user.PwUser');
         $list = $userDs->fetchUserByUid(array_keys($result), PwUser::FETCH_MAIN);
         $list = WindUtility::mergeArray($result, $list);
     }
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput(array('perpage' => $perpage), 'args');
     $this->setOutput($list, 'list');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $seoBo = PwSeoBo::getInstance();
     $lang = Wind::getComponent('i18n');
     $seoBo->setCustomSeo($lang->getMessage('SEO:manage.user.email.title'), '', '');
     Wekit::setV('seo', $seoBo);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:31,代码来源:UserController.php


示例3: __call

 /**
  * 重载了魔术方法__call
  * 
  * 当类的方法访问不到时调用该方法,在这里的实现是配置类属性对象的延迟加载策略
  * <code>
  * //延迟访问某个属性,当使用这种方式调用时该方法被调用,并访问该类中的$_delayAttributes属性,并创建该属性对象并返回
  * $this->_getMethodName(); 
  * </code>
  * @param string $methodName
  * @param array $args
  * @return mixed
  */
 public function __call($methodName, $args)
 {
     $_prefix = substr($methodName, 0, 4);
     $_propertyName = substr($methodName, 4);
     $_propertyName = WindUtility::lcfirst($_propertyName);
     if ($_prefix == '_get') {
         if (!$this->{$_propertyName} && isset($this->_delayAttributes[$_propertyName])) {
             $_property = $this->_delayAttributes[$_propertyName];
             $_value = null;
             if (isset($_property['value'])) {
                 $_value = $_property['value'];
             } elseif (isset($_property['ref'])) {
                 $_value = Wind::getApp()->getWindFactory()->getInstance($_property['ref'], $args);
             } elseif (isset($_property['path'])) {
                 $_className = Wind::import($_property['path']);
                 $_value = WindFactory::createInstance($_className, $args);
             }
             $this->{$_propertyName} = $_value;
             /*unset($this->delayAttributes[$_propertyName]);*/
         }
         return $this->{$_propertyName};
     } elseif ($_prefix == '_set') {
         $this->{$_propertyName} = $args[0];
     }
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:37,代码来源:WindModule.php


示例4: run

 /**
  * 关注-首页
  */
 public function run()
 {
     $type = $this->getInput('type');
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $url = $classCurrent = array();
     $typeCounts = $this->_getTypeDs()->countUserType($this->loginUser->uid);
     if ($type) {
         $tmp = $this->_getTypeDs()->getUserByType($this->loginUser->uid, $type, $limit, $start);
         $follows = $this->_getDs()->fetchFollows($this->loginUser->uid, array_keys($tmp));
         $count = $typeCounts[$type] ? $typeCounts[$type]['count'] : 0;
         $url['type'] = $type;
         $classCurrent[$type] = 'current';
     } else {
         $follows = $this->_getDs()->getFollows($this->loginUser->uid, $limit, $start);
         $count = $this->loginUser->info['follows'];
         $classCurrent[0] = 'current';
     }
     $uids = array_keys($follows);
     $fans = $this->_getDs()->fetchFans($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_MAIN | PwUser::FETCH_DATA | PwUser::FETCH_INFO);
     $service = $this->_getService();
     $typeArr = $service->getAllType($this->loginUser->uid);
     $userType = $service->getUserType($this->loginUser->uid, $uids);
     foreach ($userType as $key => $value) {
         $tmp = array();
         foreach ($value as $k => $v) {
             $tmp[$v] = $typeArr[$v];
         }
         ksort($tmp);
         $userType[$key] = $tmp;
     }
     $follows = WindUtility::mergeArray($follows, $userList);
     if (!$type && !$follows) {
         $num = 30;
         $uids = $this->_getRecommendService()->getOnlneUids($num);
         $uids = array_slice($uids, 0, 24);
         $this->setOutput($this->_getRecommendService()->buildUserInfo($this->loginUser->uid, $uids, $num), 'recommend');
     }
     $this->setOutput($follows, 'follows');
     $this->setOutput($typeArr, 'typeArr');
     $this->setOutput($type, 'type');
     $this->setOutput($userType, 'userType');
     $this->setOutput($typeCounts, 'typeCounts');
     $this->setOutput($fans, 'fans');
     $this->setOutput($classCurrent, 'classCurrent');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $seoBo = PwSeoBo::getInstance();
     $lang = Wind::getComponent('i18n');
     $seoBo->setCustomSeo($lang->getMessage('SEO:bbs.follow.run.title'), '', '');
     Wekit::setV('seo', $seoBo);
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:62,代码来源:FollowController.php


示例5: getDetailList

 public function getDetailList($notice)
 {
     $list = $uids = array();
     $extendParams = $notice['extend_params'];
     $uids = array_keys($extendParams);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_MAIN);
     $list['follows'] = $this->_getAttention()->fetchFollows($notice['uid'], array_keys($userList));
     $list['fans'] = WindUtility::mergeArray(array_unique($extendParams), $userList);
     return $list;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:10,代码来源:PwNoticeAttention.php


示例6: run

 /**
  * 运行当前应用
  *
  * @param string $name 应用名称默认‘phpwind’
  * @param array $components 组建配置信息 该组建配置将会覆盖原组建配置,默认为空
  */
 public static function run($name = 'phpwind', $components = array())
 {
     $config = WindUtility::mergeArray(include WEKIT_PATH . '../conf/application/default.php', include WEKIT_PATH . '../conf/application/' . $name . '.php');
     if (!empty($components)) {
         $config['components'] = (array) $components + $config['components'];
     }
     /* @var $application WindWebFrontController */
     $application = Wind::application($name, $config);
     $application->registeFilter(new PwFrontFilters($application));
     $application->run();
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:17,代码来源:wekit.php


示例7: __construct

 /**
  * manifest path
  *
  * @param string $manifest        	
  */
 public function __construct($manifest, $extends = array())
 {
     is_string($manifest) && ($manifest = Wind::getComponent('configParser')->parse($manifest));
     if ($extends) {
         $manifest = WindUtility::mergeArray($manifest, $extends);
         $charset = isset($manifest['application']['charset']) ? $manifest['application']['charset'] : 'utf-8';
     } else {
         $charset = Wekit::app()->charset;
     }
     strncasecmp($charset, 'utf', 3) && ($manifest = WindConvert::convert($manifest, $charset, 'utf-8'));
     $this->manifest = $manifest;
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:17,代码来源:PwManifest.php


示例8: showErrorMessage

 protected function showErrorMessage($message, $file, $line, $trace, $errorcode)
 {
     $log = $message . "\r\n" . $file . ":" . $line . "\r\n";
     list($fileLines, $trace) = WindUtility::crash($file, $line, $trace);
     foreach ($trace as $key => $value) {
         $log .= $value . "\r\n";
     }
     if (WIND_DEBUG & 2) {
         Wind::getApp()->getComponent('windLogger')->error($log, 'error', true);
     }
     exit($log);
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:12,代码来源:WindCommandFrontController.php


示例9: addThread

 /**
  * 发表帖子 钩子
  */
 public function addThread($tid)
 {
     $data = $this->inputData;
     if (intval($data['isopen'] != 1)) {
         return false;
     }
     $tid = intval($tid);
     if ($tid < 1) {
         return false;
     }
     $token = strtolower(WindUtility::generateRandStr(10));
     $dm = $this->_getEncryptPostsDm();
     $dm->setTid($tid)->setToken($token);
     return $this->_getEncryptPostsDs()->add($dm);
 }
开发者ID:sanzhumu,项目名称:nextwind,代码行数:18,代码来源:App_EncryptPosts_EncryptPostsService.php


示例10: run

 /**
  * 关注-首页
  */
 public function run()
 {
     $type = $this->getInput('type');
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $args = $classCurrent = array();
     /*		$typeCounts = $this->_getTypeDs()->countUserType($this->space->spaceUid);
     		if ($type) {
     			$tmp = $this->_getTypeDs()->getUserByType($this->space->spaceUid, $type, $limit, $start);
     			$follows = $this->_getDs()->fetchFollows($this->space->spaceUid, array_keys($tmp));
     			$count = $typeCounts[$type] ? $typeCounts[$type]['count'] : 0;
     			$classCurrent[$type] = 'current';
     			$args = array('type' => $type);
     		} else {*/
     $follows = $this->_getDs()->getFollows($this->space->spaceUid, $limit, $start);
     $count = $this->space->spaceUser['follows'];
     $classCurrent[0] = 'current';
     //}
     $uids = array_keys($follows);
     $fans = $this->_getDs()->fetchFans($this->loginUser->uid, $uids);
     $myfollows = $this->_getDs()->fetchFollows($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_ALL);
     $service = $this->_getService();
     $args['uid'] = $this->space->spaceUid;
     $follows = WindUtility::mergeArray($follows, $userList);
     if (!$follows && $this->space->tome == PwSpaceBo::MYSELF) {
         $num = 20;
         $uids = $this->_getRecommendService()->getRecommendAttention($this->loginUser->uid, $num);
         $this->setOutput($this->_getRecommendService()->buildUserInfo($this->loginUser->uid, $uids, $num), 'recommend');
     }
     $this->setOutput($fans, 'fans');
     $this->setOutput($follows, 'follows');
     $this->setOutput($myfollows, 'myfollows');
     $this->setOutput($classCurrent, 'classCurrent');
     $this->setOutput($args, 'args');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput('follows', 'src');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $seoBo = PwSeoBo::getInstance();
     $lang = Wind::getComponent('i18n');
     $seoBo->setCustomSeo($lang->getMessage('SEO:space.follows.run.title', array($this->space->spaceUser['username'], $this->space->space['space_name'])), '', $lang->getMessage('SEO:space.follows.run.description', array($this->space->spaceUser['username'])));
     Wekit::setV('seo', $seoBo);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:51,代码来源:FollowsController.php


示例11: initConfig

 public function initConfig($config, $factory)
 {
     is_array($config) || ($config = $factory->getInstance('configParser')->parse($config));
     foreach ($config['web-apps'] as $key => $value) {
         if (isset($this->_config['web-apps'][$key])) {
             continue;
         }
         $rootPath = empty($value['root-path']) ? dirname($_SERVER['SCRIPT_FILENAME']) : Wind::getRealPath($value['root-path'], true);
         Wind::register($rootPath, $key, true);
         if ('default' !== $key && !empty($config['default'])) {
             $value = WindUtility::mergeArray($config['default'], $value);
         }
         $this->setConfig($key, $value);
     }
     $this->_config['router'] = isset($config['router']) ? $config['router'] : array();
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:16,代码来源:TestFrontController.php


示例12: addAction

 public function addAction()
 {
     $struct = $this->getInput('struct', 'post');
     $model = $this->getInput('model', 'post');
     $pageid = $this->getInput('pageid', 'post');
     if (!$model) {
         $this->showError('operate.fail');
     }
     Wekit::load('design.PwDesignPermissions');
     $permissions = $this->_getPermissionsService()->getPermissionsForPage($this->loginUser->uid, $pageid);
     if ($permissions < PwDesignPermissions::IS_DESIGN) {
         $this->showError("DESIGN:permissions.fail");
     }
     Wind::import('SRV:design.bo.PwDesignModelBo');
     $bo = new PwDesignModelBo($model);
     if (!$bo->isModel()) {
         $this->showError('operate.fail');
     }
     $cls = sprintf('PwDesign%sDataService', ucwords($model));
     Wind::import('SRV:design.srv.model.' . $model . '.' . $cls);
     $service = new $cls();
     $decorator = $service->decorateAddProperty($model);
     $_models = array();
     $service = $this->_getDesignService();
     $types = $service->getDesignModelType();
     $models = $service->getModelList();
     foreach ($models as $k => $v) {
         $_models[$v['type']][] = array('name' => $v['name'], 'model' => $k);
     }
     $ds = $this->_getModuleDs();
     $pageInfo = $this->_getPageDs()->getPage($pageid);
     $module['module_name'] = $pageInfo['page_name'] . '_' . WindUtility::generateRandStr(4);
     $cache['expired'] = 15;
     $this->setOutput($cache, 'cache');
     $this->setOutput($module, 'module');
     $this->setOutput($types, 'types');
     $this->setOutput($_models, 'models');
     $this->setOutput($bo->getProperty(), 'property');
     $this->setOutput($bo->getModel(), 'modelInfo');
     $this->setOutput($decorator, 'decorator');
     $this->setOutput($model, 'model');
     $this->setOutput($pageid, 'pageid');
     $this->setOutput($struct, 'struct');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:44,代码来源:PropertyController.php


示例13: dorunAction

 public function dorunAction()
 {
     $this->getRequest()->isPost() || $this->showError('operate.fail');
     list($windid, $serverUrl, $clientId, $clientKey, $connect) = $this->getInput(array('windid', 'serverUrl', 'clientId', 'clientKey', 'connect'), 'post');
     if ($windid == 'local') {
         $serverUrl = Wekit::C('site', 'info.url') . '/windid';
         $clientId = 1;
         !$clientKey && ($clientKey = md5(WindUtility::generateRandStr(10)));
         $connect = 'db';
     }
     $config = new PwConfigSet('windid');
     $config->set('windid', $windid)->set('serverUrl', $serverUrl)->set('clientId', $clientId)->set('clientKey', $clientKey)->set('connect', $connect);
     if ($windid == 'client') {
         list($dbhost, $dbport, $dbuser, $dbpwd, $dbname, $dbprefix, $dbcharset) = $this->getInput(array('dbhost', 'dbport', 'dbuser', 'dbpwd', 'dbname', 'dbprefix', 'dbcharset'), 'post');
         $config->set('db.host', $dbhost)->set('db.port', $dbport)->set('db.user', $dbuser)->set('db.pwd', $dbpwd)->set('db.name', $dbname)->set('db.prefix', $dbprefix)->set('db.charset', $dbcharset);
     }
     $config->flush();
     if ($clientId) {
         Wekit::C()->reload('windid');
         $service = WindidApi::api('app');
         WindidApi::getDm('app');
         if (!$service->getApp($clientId)) {
             $charset = Wekit::V('charset');
             $charset = str_replace('-', '', strtolower($charset));
             if (!in_array($charset, array('gbk', 'utf8', 'big5'))) {
                 $charset = 'utf8';
             }
             $dm = new WindidAppDm();
             $dm->setId($clientId)->setApiFile('windid.php')->setIsNotify(1)->setIsSyn(1)->setAppName(Wekit::C('site', 'info.name'))->setSecretkey($clientKey)->setAppUrl(Wekit::C('site', 'info.url'))->setAppIp(Wind::getComponent('request')->getClientIp())->setCharset($charset);
             $service->addApp($dm);
         } elseif ($clientKey) {
             $dm = new WindidAppDm($clientId);
             $dm->setSecretkey($clientKey)->setAppUrl(Wekit::C('site', 'info.url'))->setCharset($charset);
             $service->editApp($dm);
         }
     }
     $_avatarUrl = WindidApi::api('avatar')->getAvatarUrl();
     if ($_avatarUrl != WindidError::SERVER_ERROR) {
         Wekit::C()->setConfig('site', 'avatarUrl', $_avatarUrl);
     }
     $this->showMessage('ADMIN:success');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:42,代码来源:WindidController.php


示例14: preHandle

 public function preHandle()
 {
     if (!$this->form) {
         return null;
     }
     $className = Wind::import($this->form);
     $form = WindFactory::createInstance($className);
     $methods = get_class_methods($form);
     foreach ($methods as $method) {
         if (0 !== strpos($method, 'set') || '' == ($_tmp = substr($method, 3))) {
             continue;
         }
         if (null === ($input = $this->getRequest()->getRequest(WindUtility::lcfirst($_tmp), null))) {
             continue;
         }
         call_user_func_array(array($form, $method), array($input));
     }
     $form->validate();
     $this->getRequest()->setAttribute($form, WindUtility::lcfirst($className));
     $this->sendError($form->getErrorAction(), $form->getErrors());
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:21,代码来源:WindFormFilter.php


示例15: emailAction

 /** 
  * 电子邮件用户激活
  */
 public function emailAction()
 {
     list($page, $perpage) = $this->getInput(array('page', 'perpage'));
     $page = $page ? $page : 1;
     $perpage = $perpage ? $perpage : $this->perpage;
     $count = $this->_getDs()->countUnActived();
     $list = array();
     if ($count > 0) {
         $totalPage = ceil($count / $perpage);
         $page > $totalPage && ($page = $totalPage);
         $result = $this->_getDs()->getUnActivedList($perpage, intval(($page - 1) * $perpage));
         /* @var $userDs PwUser */
         $userDs = Wekit::load('user.PwUser');
         $list = $userDs->fetchUserByUid(array_keys($result), PwUser::FETCH_MAIN);
         $list = WindUtility::mergeArray($result, $list);
     }
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($list, 'list');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:24,代码来源:CheckController.php


示例16: run

 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $count = $this->loginUser->info['fans'];
     $fans = $this->_getDs()->getFans($this->loginUser->uid, $limit, $start);
     $uids = array_keys($fans);
     $follows = $this->_getDs()->fetchFollows($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_MAIN | PwUser::FETCH_DATA | PwUser::FETCH_INFO);
     $this->setOutput(WindUtility::mergeArray($fans, $userList), 'fans');
     $this->setOutput($follows, 'follows');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     //$this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.fans.run.title'), '', '');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:22,代码来源:FansController.php


示例17: run

 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $fans = $this->_getDs()->getFans($this->space->spaceUid, $limit, $start);
     $uids = array_keys($fans);
     $count = $this->space->spaceUser['fans'];
     $follows = $this->_getDs()->fetchFollows($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_ALL);
     $this->setOutput(WindUtility::mergeArray($fans, $userList), 'fans');
     $this->setOutput($follows, 'follows');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput('fans', 'src');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:space.fans.run.title', array($this->space->spaceUser['username'], $this->space->space['space_name'])), '', $lang->getMessage('SEO:space.fans.run.description', array($this->space->spaceUser['username'])));
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:22,代码来源:FansController.php


示例18: getPermissionCategoryConfig

 /**
  * 获取搜索用户组根权限配置
  *
  * @param array $config
  * @return multitype:multitype:string  
  */
 public function getPermissionCategoryConfig($config)
 {
     $searchconfig = array('other' => array('sub' => array('tag' => array('name' => '本地搜索', 'items' => array('app_search_open', 'app_search_time_interval')))));
     return WindUtility::mergeArray($config, $searchconfig);
 }
开发者ID:sanzhumu,项目名称:nextwind,代码行数:11,代码来源:App_Search_ConfigDo.php


示例19: getCompiledBlockKey

 /**
  * 获得切分后块编译缓存Key值,Key值为一个50位的随机字符串,当产生重复串时继续查找
  * 
  * @return string
  */
 protected function getCompiledBlockKey()
 {
     $key = WindUtility::generateRandStr(50);
     if (key_exists($key, $this->compiledBlockData)) {
         return $this->getCompiledBlockKey();
     }
     return $key;
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:13,代码来源:WindViewTemplate.php


示例20: generateGUID

 /**
  * 获取唯一标识符串,标识符串的长度为16个字节,128位.
  * 根据当前时间与sessionID,混合生成一个唯一的串.
  * 
  * @return string GUID串,16个字节
  */
 public static function generateGUID()
 {
     return substr(md5(WindUtility::generateRandStr(8) . microtime()), -16);
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:10,代码来源:WindSecurity.php



注:本文中的WindUtility类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WindidApi类代码示例发布时间:2022-05-23
下一篇:
PHP WindUrlHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap