當前位置: 首頁>>代碼示例>>PHP>>正文


PHP utf_ucfirst函數代碼示例

本文整理匯總了PHP中utf_ucfirst函數的典型用法代碼示例。如果您正苦於以下問題:PHP utf_ucfirst函數的具體用法?PHP utf_ucfirst怎麽用?PHP utf_ucfirst使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了utf_ucfirst函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable} WHERE group_single_user = 0";
     $result = cpg_db_query($sql, $this->link_id);
     $udb_groups = array(102 => 'Administrators', 2 => 'Registered', 3 => 'Guests');
     while ($row = mysql_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     return $udb_groups;
 }
開發者ID:JoseCOCA,項目名稱:baudprint,代碼行數:10,代碼來源:phpbb.inc.php

示例2: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = cpg_db_query($sql, $this->link_id);
     $udb_groups = array(1 => 'Guests');
     while ($row = mysql_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     return $udb_groups;
 }
開發者ID:phill104,項目名稱:branches,代碼行數:10,代碼來源:mambo.inc.php

示例3: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = $this->query($sql);
     // XMB has no guest group in groups table, so adding one here
     $udb_groups = array(3 => 'Guests');
     while ($row = cpg_db_fetch_assoc($result)) {
         $udb_groups[$row['id'] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     $result->free();
     return $udb_groups;
 }
開發者ID:CatBerg-TestOrg,項目名稱:coppermine,代碼行數:12,代碼來源:xmb.inc.php

示例4: collect_groups

 function collect_groups()
 {
     // Use this version to exclude true post based groups
     //$sql ="SELECT * FROM {$this->groupstable} WHERE minposts=-1";
     // Use this version to include all SMF groups
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = cpg_db_query($sql, $this->link_id);
     $udb_groups = array(1 => 'Guests', 2 => 'Registered');
     while ($row = mysql_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     return $udb_groups;
 }
開發者ID:phill104,項目名稱:branches,代碼行數:13,代碼來源:smf20.inc.php

示例5: synchronize_groups

 function synchronize_groups()
 {
     global $CONFIG;
     if ($this->use_post_based_groups) {
         if ($this->group_overrride) {
             $udb_groups = $this->collect_groups();
         } else {
             $sql = "SELECT * FROM {$this->groupstable} WHERE {$this->field['grouptbl_group_name']} <> ''";
             $result = cpg_db_query($sql, $this->link_id);
             $udb_groups = array();
             while ($row = mysql_fetch_assoc($result)) {
                 $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
             }
         }
     } else {
         $udb_groups = array(1 => 'Administrators', 2 => 'Registered', 3 => 'Guests');
     }
     $result = cpg_db_query("SELECT group_id, group_name FROM {$CONFIG['TABLE_USERGROUPS']} WHERE 1");
     while ($row = mysql_fetch_array($result)) {
         $cpg_groups[$row['group_id']] = $row['group_name'];
     }
     mysql_free_result($result);
     /* Must be removed to allow new groups to be created in an unbridged install.
        // Scan Coppermine groups that need to be deleted
        foreach($cpg_groups as $c_group_id => $c_group_name) {
            if ((!isset($udb_groups[$c_group_id]))) {
                cpg_db_query("DELETE FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id = '" . $c_group_id . "' LIMIT 1");
                unset($cpg_groups[$c_group_id]);
            }
        }
        */
     // Scan udb groups that need to be created inside Coppermine table
     foreach ($udb_groups as $i_group_id => $i_group_name) {
         if (!isset($cpg_groups[$i_group_id])) {
             // add admin info
             $admin_access = in_array($i_group_id - 100, $this->admingroups) ? '1' : '0';
             cpg_db_query("INSERT INTO {$CONFIG['TABLE_USERGROUPS']} (group_id, group_name, has_admin_access) VALUES ('{$i_group_id}', '" . addslashes($i_group_name) . "', '{$admin_access}')");
             $cpg_groups[$i_group_id] = $i_group_name;
         }
     }
     // Update Group names
     foreach ($udb_groups as $i_group_id => $i_group_name) {
         if ($cpg_groups[$i_group_id] != $i_group_name) {
             cpg_db_query("UPDATE {$CONFIG['TABLE_USERGROUPS']} SET group_name = '" . addslashes($i_group_name) . "' WHERE group_id = '{$i_group_id}' LIMIT 1");
         }
     }
     // fix admin grp
     if (!$this->use_post_based_groups) {
         cpg_db_query("UPDATE {$CONFIG['TABLE_USERGROUPS']} SET has_admin_access = '1' WHERE group_id = '1' LIMIT 1");
     }
 }
開發者ID:JoseCOCA,項目名稱:baudprint,代碼行數:51,代碼來源:coppermine.inc.php

示例6: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = $this->query($sql);
     $udb_groups = array(1 => 'Administrators', 2 => 'Registered', 3 => 'Guests');
     while ($row = cpg_db_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     $result->free();
     return $udb_groups;
 }
開發者ID:CatBerg-TestOrg,項目名稱:coppermine,代碼行數:11,代碼來源:phorum.inc.php


注:本文中的utf_ucfirst函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。