本文整理汇总了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');
}
示例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);
}
示例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);
}
}