当前位置: 首页>>代码示例>>PHP>>正文


PHP string::hstrtoupper方法代码示例

本文整理汇总了PHP中string::hstrtoupper方法的典型用法代码示例。如果您正苦于以下问题:PHP string::hstrtoupper方法的具体用法?PHP string::hstrtoupper怎么用?PHP string::hstrtoupper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在string的用法示例。


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

示例1: dodefault

 function dodefault()
 {
     $len = strlen('plugin-momo-momo-default-');
     $title = substr($_SERVER['QUERY_STRING'], $len);
     $title = urldecode($title);
     $title = trim($title);
     $title2 = $title;
     $title = urldecode($title);
     if (string::hstrtoupper(WIKI_CHARSET) == 'GBK') {
         $title = string::hiconv($title, $to = 'gbk', $from = 'utf-8');
     }
     $doc = $_ENV['momo']->get_doc_by_title($title);
     if ($doc) {
         $doc['image'] = util::getfirstimg($doc['content']);
         $momourl = trim($this->plugin[momo][vars][momourl]);
         if ($momourl) {
             $doc['url'] = $momourl . "index.php?doc-view-" . $doc['did'] . $this->setting['seo_suffix'];
         } else {
             $doc['url'] = $this->setting['site_url'] . "/" . $this->setting['seo_prefix'] . "doc-view-" . $doc['did'] . $this->setting['seo_suffix'];
         }
         $doc_exists = 1;
     } else {
         $url = 'http://www.hudong.com/validateDocSummary.do?doc_title=' . $title2;
         $data = util::hfopen($url);
         $doc_exists = 1;
         if ($data && stripos($data, '<flag>true</flag>') && preg_match_all("/<\\!\\[CDATA\\[(.*)\\]\\]>/", $data, $matches)) {
             $summary = $matches[1][1];
             $image = $matches[1][2];
             if ($summary == 'null') {
                 $summary = '';
             }
             if ($image == 'null') {
                 $image = '';
             }
             if (string::hstrtoupper(WIKI_CHARSET) == 'GBK') {
                 $summary = string::hiconv($summary, $to = 'gbk', $from = 'utf-8');
             }
             $doc = array('image' => $image, 'url' => 'http://www.hudong.com/wiki/' . $title, 'summary' => $summary);
         } else {
             $doc_exists = 0;
         }
     }
     $this->view->assign("doc_exists", $doc_exists);
     $this->view->assign("doc", $doc);
     $this->view->assign("encode", WIKI_CHARSET);
     $this->view->assign("title", $title);
     $this->view->display('file://plugins/momo/view/momo');
 }
开发者ID:meiwenhui,项目名称:hdwiki,代码行数:48,代码来源:momo.php

示例2: doshortcut

 function doshortcut()
 {
     $shortcut = trim($this->post['link']);
     if (string::hstrtoupper(WIKI_CHARSET) == 'GBK') {
         $shortcut = string::hiconv($shortcut, 'gbk', 'utf-8');
     }
     $setting['shortcut'] = $shortcut;
     $setting['shortcutstate'] = $this->post['shortcutstate'];
     $_ENV['setting']->update_setting($setting);
     $this->cache->removecache('setting');
     $this->message("1", "", 2);
 }
开发者ID:meiwenhui,项目名称:hdwiki,代码行数:12,代码来源:admin_setting.php

示例3: doaddrelatedoc

 function doaddrelatedoc()
 {
     $did = trim($this->post['did']);
     if (is_numeric($did)) {
         $relate = trim($this->post['relatename']);
         $title = htmlspecialchars(trim($this->post['title']));
         if (string::hstrtoupper(WIKI_CHARSET) == 'GBK') {
             $relate = string::hiconv($relate, 'gbk', 'utf-8');
             $title = string::hiconv($title, 'gbk', 'utf-8');
         }
         $list = array();
         if ($relate) {
             $list = array_unique(explode(';', $relate));
             foreach ($list as $key => $relatename) {
                 $relatename = htmlspecialchars($relatename);
                 if ($_ENV['doc']->have_danger_word($relatename)) {
                     unset($list[$key]);
                     $this->message("2", "", 2);
                 }
             }
         }
         $_ENV['doc']->add_relate_title($did, $title, $list);
         $this->message("1", "", 2);
     }
 }
开发者ID:meiwenhui,项目名称:hdwiki,代码行数:25,代码来源:doc.php


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