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

PHP Chinese类代码示例

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

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



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

示例1: change2pinyin

function change2pinyin($str, $type = '')
{
    $ret = "";
    if (WEB_LANG == 'utf-8') {
        if (function_exists('iconv')) {
            $str = iconv('UTF-8', 'GBK//IGNORE', $str);
        } else {
            require_once ROOT_PATH . "inc/class.chinese.php";
            $cnvert = new Chinese("UTF8", "GB2312", $str, ROOT_PATH . "./inc/gbkcode/");
            $str = $cnvert->ConvertIT();
        }
    } elseif (WEB_LANG == 'big5') {
        require_once ROOT_PATH . "inc/class.chinese.php";
        $cnvert = new Chinese("BIG5", "GB2312", $str, ROOT_PATH . "./inc/gbkcode/");
        $str = $cnvert->ConvertIT();
    }
    for ($i = 0; $i < strlen($str); $i++) {
        $p = ord(substr($str, $i, 1));
        if ($p > 160) {
            $q = ord(substr($str, ++$i, 1));
            $p = $p * 256 + $q - 65536;
        }
        $ret .= GetPinYin($p, $type);
    }
    return $ret;
}
开发者ID:GHubgenius,项目名称:qbbj,代码行数:26,代码来源:pinyin.php


示例2: iconv

 function iconv($s, $d, $string)
 {
     require_once ROOT_PATH . "inc/class.chinese.php";
     $cnvert = new Chinese("GB2312", "UTF8", $string, ROOT_PATH . "./inc/gbkcode/");
     $string = $cnvert->ConvertIT();
     return $string;
 }
开发者ID:GHubgenius,项目名称:qbbj,代码行数:7,代码来源:yeepay.php


示例3: save_xml_file

function save_xml_file($filename, $xml_file)
{
    global $app_strings;
    $handle = fopen($filename, 'w');
    //fwrite($handle,iconv("GBK","UTF-8",$xml_file));
    if (!$handle) {
        return;
    }
    // Write $somecontent to our opened file.)
    if ($app_strings['LBL_CHARSET'] == "GBK") {
        if (function_exists('iconv')) {
            $xml_file = iconv_ec("GB2312", "UTF-8", $xml_file);
        } else {
            $chs = new Chinese("GBK", "UTF8", trim($xml_file));
            $xml_file = $chs->ConvertIT();
        }
        if (fwrite($handle, $xml_file) === FALSE) {
            return false;
        }
    } else {
        if ($app_strings['LBL_CHARSET'] != "UTF-8") {
            //$xml_file = iconv("ISO-8859-1","UTF-8",$xml_file);
            if (fwrite($handle, utf8_encode($xml_file)) === FALSE) {
                return false;
            }
        } else {
            if (fwrite($handle, $xml_file) === FALSE) {
                return false;
            }
        }
    }
    fclose($handle);
    return true;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:34,代码来源:Charts.php


示例4: get_payment_code

 public function get_payment_code($payment_notice_id)
 {
     $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
     //$order = $GLOBALS['db']->getRow("select order_sn,bank_id from ".DB_PREFIX."deal_order where id = ".$payment_notice['order_id']);
     $order_sn = $payment_notice['notice_sn'];
     $money = round($payment_notice['money'], 2);
     $payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
     $payment_info['config'] = unserialize($payment_info['config']);
     /*$data_front_url =  SITE_DOMAIN.APP_ROOT.'/index.php?ctl=payment&act=notify&class_name=Guofubao';
       $data_front_url="";
       $data_return_url = SITE_DOMAIN.APP_ROOT.'/index.php?ctl=payment&act=response&class_name=Guofubao';
       */
     //新
     $data_front_url = SITE_DOMAIN . APP_ROOT . '/callback/pay/guofubao_callback.php?act=notify';
     //$data_front_url="";
     $data_return_url = SITE_DOMAIN . APP_ROOT . '/callback/pay/guofubao_callback.php?act=response';
     $tranCode = '8888';
     //$spbill_create_ip = $_SERVER['REMOTE_ADDR'];
     $spbill_create_ip = CLIENT_IP;
     /* 交易日期 */
     $today = to_date($payment_notice['create_time'], 'YmdHis');
     $bank_id = $payment_notice['bank_id'];
     if ($bank_id == '0') {
         $bank_id = '';
     }
     $desc = $order_sn;
     include_once APP_ROOT_PATH . "system/libs/iconv.php";
     $chinese = new Chinese();
     $desc = $chinese->Convert("UTF-8", "GBK", $desc);
     /* 货币类型 */
     $currencyType = '156';
     /* 数字签名 */
     $version = '2.1';
     $tranCode = $tranCode;
     $merchant_id = $payment_info['config']['merchant_id'];
     $merOrderNum = $order_sn;
     $tranAmt = $money;
     // 总金额
     $feeAmt = '';
     $tranDateTime = $today;
     $frontMerUrl = $data_front_url;
     $backgroundMerUrl = $data_return_url;
     //返回的路径
     $tranIP = $spbill_create_ip != "" ? $spbill_create_ip : '';
     //商户识别码
     $verficationCode = $payment_info['config']['VerficationCode'];
     $gopayServerTime = trim(file_get_contents("https://www.gopay.com.cn/PGServer/time"));
     $signValue = 'version=[' . $version . ']tranCode=[' . $tranCode . ']merchantID=[' . $merchant_id . ']merOrderNum=[' . $merOrderNum . ']tranAmt=[' . $tranAmt . ']feeAmt=[' . $feeAmt . ']tranDateTime=[' . $tranDateTime . ']frontMerUrl=[' . $frontMerUrl . ']backgroundMerUrl=[' . $backgroundMerUrl . ']orderId=[]gopayOutOrderId=[]tranIP=[' . $tranIP . ']respCode=[]gopayServerTime=[' . $gopayServerTime . ']VerficationCode=[' . $verficationCode . ']';
     $signValue = md5($signValue);
     /*交易参数*/
     $parameter = array('version' => '2.1', 'charset' => '2', 'language' => '1', 'signType' => '1', 'tranCode' => '8888', 'merchantID' => $merchant_id, 'virCardNoIn' => $payment_info['config']['virCardNoIn'], 'merOrderNum' => $merOrderNum, 'tranAmt' => $tranAmt, 'currencyType' => $currencyType, 'tranDateTime' => $tranDateTime, 'tranIP' => $spbill_create_ip, 'goodsName' => $desc, 'goodsDetail' => '', 'buyerName' => '', 'buyerContact' => '', 'frontMerUrl' => $frontMerUrl, 'backgroundMerUrl' => $backgroundMerUrl, 'signValue' => $signValue, 'gopayServerTime' => $gopayServerTime, 'bankCode' => $bank_id, 'userType' => 1, 'feeAmt' => '', 'isRepeatSubmit' => '', 'merRemark1' => $payment_notice_id, 'merRemark2' => '');
     $def_url = '<form style="text-align:center;" action="https://gateway.gopay.com.cn/Trans/WebClientAction.do" target="_blank" style="margin:0px;padding:0px" method="get" >';
     foreach ($parameter as $key => $val) {
         $def_url .= "<input type='hidden' name='{$key}' value='{$val}' />";
     }
     $def_url .= "<input type='submit' class='paybutton' value='前往国付宝在线支付' />";
     $def_url .= "</form>";
     $def_url .= "<br /><div style='text-align:center' class='red'>" . $GLOBALS['lang']['PAY_TOTAL_PRICE'] . ":" . format_price($money) . "</div>";
     return $def_url;
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:60,代码来源:Guofubao_payment.php


示例5: _iconv

function _iconv($s, $t, $data)
{
    if (function_exists('iconv')) {
        return iconv($s, $t, $data);
    } else {
        require_once 'chinese.class.php';
        $chs = new Chinese($s, $t);
        return $chs->convert($data);
    }
}
开发者ID:Harvey,项目名称:www.nextim.cn,代码行数:10,代码来源:common.php


示例6: smarty_outputfilter_langset

/**
 * Smarty trimwhitespace outputfilter plugin
 *
 * File:     outputfilter.trimwhitespace.php<br>
 * Type:     outputfilter<br>
 * Name:     trimwhitespace<br>
 * Date:     Jan 25, 2003<br>
 * Purpose:  trim leading white space and blank lines from
 *           template source after it gets interpreted, cleaning
 *           up code and saving bandwidth. Does not affect
 *           <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks.<br>
 * Install:  Drop into the plugin directory, call
 *           <code>$smarty->load_filter('output','trimwhitespace');</code>
 *           from application.
 * @author   Monte Ohrt <monte at ohrt dot com>
 * @author Contributions from Lars Noschinski <[email protected]>
 * @version  1.3
 * @param string
 * @param Smarty
 */
function smarty_outputfilter_langset($source, &$smarty)
{
    if ($_SESSION['langset'] == 'zh_tw') {
        //$source = iconv('UTF-8', 'GB2312'.'//TRANSLIT', $source);
        $source = iconv('UTF-8', 'GB2312' . '//IGNORE', $source);
        $objCnvert = new Chinese("GB2312", "BIG5", $source, __WEBCOMMON_ROOT . '/chinese/config/');
        $source = $objCnvert->ConvertIT();
        $source = iconv('BIG5', 'UTF-8' . '//IGNORE', $source);
    }
    return $source;
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:outputfilter.langset.php


示例7: webim_from_utf8

function webim_from_utf8($charset, $str)
{
    if (strtoupper($charset) == 'UTF-8') {
        return $str;
    }
    if (function_exists('iconv')) {
        return iconv('utf-8', $charset, $str);
    }
    require_once dirname(__FILE__) . '/class_chinese.php';
    $chs = new Chinese('utf-8', $charset);
    return $chs->Convert($str);
}
开发者ID:nextalk,项目名称:webim-for-php4,代码行数:12,代码来源:webim_common.func.php


示例8: jsprocdata

function jsprocdata($data, $requestcharset)
{
    global $boardurl, $_DCACHE, $charset;
    if ($requestcharset) {
        include DISCUZ_ROOT . 'include/chinese.class.php';
        if (strtoupper($charset) != 'UTF-8') {
            $c = new Chinese($charset, 'utf8');
        } else {
            $c = new Chinese('utf8', $requestcharset == 1 ? 'gbk' : 'big5');
        }
        $data = $c->Convert($data);
    }
    return 'document.write(\'' . preg_replace("/\r\n|\n|\r/", '\\n', addcslashes($data, "'\\")) . '\');';
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:14,代码来源:javascript.php


示例9: big52utf8

 public function big52utf8($string)
 {
     $string = mb_convert_encoding($string, "UTF-8", "BIG5");
     $string = Chinese::decimal_notation_converting($string);
     $string = $this->stringRevise($string);
     return $string;
 }
开发者ID:bunkeraa,项目名称:laravel,代码行数:7,代码来源:lib.php


示例10: wap_footer

function wap_footer()
{
    global $wind_version, $db_obstart, $windid, $db_charset, $db_wapcharset, $prog, $chs;
    require_once PrintEot('wap_footer');
    $output = ob_get_contents();
    ob_end_clean();
    $db_obstart && function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
    if ($db_charset != 'utf8') {
        $chs = new Chinese();
        $output = $chs->Convert($output, $db_charset, $db_wapcharset ? 'UTF8' : 'UNICODE');
    }
    $output = str_replace(array('<!--<!---->', '<!---->'), '', $output);
    echo $output;
    flush();
    exit;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:16,代码来源:wap_mod.php


示例11: get_seo_info

function get_seo_info($domain, $che)
{
    global $ROBOT;
    $che = explode(',', $che);
    $ch = array_combine($che, $che);
    $content = '';
    $site_info = '';
    $link_info = '';
    $jobs = array();
    $jobs[1] = "baidu";
    $jobs[2] = "google";
    $jobs[3] = "yahoo";
    $jobs[4] = "soso";
    $jobs[5] = "vnet";
    $jobs[6] = "so163";
    $jobs[7] = "sogou";
    $a = '<table border=1 width=100% bordercolordark=#FFFFFF cellspacing=0 cellpadding=0 bordercolorlight=#BBD7E6>	<tr bgcolor=#D8F0FC><td colspan=9>网址<a href=http://' . $domain . ' target=_blank>http://' . $domain . '</a>在各大搜索引擎的收录查询结果</td></tr><tr><td>搜索引擎</td>';
    for ($i = 1; $i <= sizeof($jobs); $i++) {
        if ($ch[$i]) {
            $a .= "<td>" . $ROBOT[$jobs[$i]]['name'] . "</td>";
        }
    }
    $a .= "</tr><tr><td>收录数量</td>";
    for ($i = 1; $i <= sizeof($jobs); $i++) {
        if ($ch[$i]) {
            eval('$__file__=__FILE__;');
            define('ROOT_PATH', $__file__ ? dirname($__file__) . '/' : './');
            $content[$i] = get_content($ROBOT[$jobs[$i]]['site_url'] . $domain);
            if ($i == 3 || $i == 5 || $i == 6) {
                require_once 'require/chinese.php';
                $chs = new Chinese('utf-8', 'GB2312');
                $content[$i] = $chs->Convert($content[$i]);
            }
            if (empty($content[$i])) {
                return 'Unkown Error...';
            }
            if (preg_match($ROBOT[$jobs[$i]]['site_pattern'], $content[$i], $matches[$i])) {
                $site_info[$i] = $matches[$i][1];
            }
            $site_info[$i] = $site_info[$i] ? $site_info[$i] : '--';
            $a .= '<td><a href="' . $ROBOT[$jobs[$i]]['site_url'] . $domain . '" target="_blank">' . $site_info[$i] . '</a></td>';
        }
    }
    $a .= "</tr><tr><td>相关查询</td><td colspan=7 align=left><a href=../ip/index.php?domain=" . $domain . " target=_blank>IP地址查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=../pr/pr.php?domain=" . $domain . " target=_blank>PR查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=../whois/index.php?domain=" . $domain . " target=_blank>域名Whois查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=/alexa target=_blank>Alexa排名查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=../friends/friends.php?domain=" . $domain . " target=_blank>友情链接查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=../friendlink/friendlink.php?domain=" . $domain . " target=_blank>友情链接IP查询</a></td></tr></table>";
    return $a;
}
开发者ID:repodevs,项目名称:web_admin_tools,代码行数:46,代码来源:function.php


示例12: pinyin_slugs

function pinyin_slugs($slug)
{
    // We don't want to change an existing slug
    if ($slug) {
        return $slug;
    }
    global $wpdb;
    require "class.Chinese.php";
    $codeTablesDir = dirname(__FILE__) . "/config/";
    // Replace post title
    $title = $_POST['post_title'];
    $chs = new Chinese("UTF8", "GB2312", $title, $codeTablesDir);
    $title = $chs->ConvertIT();
    $chs = new Chinese("GB2312", "PinYin", $title, $codeTablesDir);
    $title = $chs->ConvertIT();
    $title = str_replace(" ", "", $title);
    return sanitize_title($title);
}
开发者ID:hjm8809,项目名称:xsphp.com,代码行数:18,代码来源:pinyin-slug.php


示例13: insenz_convert

function insenz_convert($str, $type = 1)
{
    global $charset, $discuz_chs, $insenz_chs;
    if ($charset != 'utf-8') {
        require_once DISCUZ_ROOT . './include/chinese.class.php';
        if ($type) {
            if (!$insenz_chs) {
                $insenz_chs = new Chinese($charset, 'utf-8', TRUE);
            }
            $str = $insenz_chs->convert($str);
        } else {
            if (!$discuz_chs) {
                $discuz_chs = new Chinese('utf-8', $charset, TRUE);
            }
            $str = $discuz_chs->convert($str);
        }
    }
    return $type ? htmlspecialchars($str) : addslashes($str);
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:19,代码来源:insenz.func.php


示例14: _buildResult

 function _buildResult($result, $index)
 {
     require_once R_P . 'm/chinese.php';
     $chs = new Chinese('utf8', 'gbk');
     foreach ($result["words"] as $word => $info) {
         $words[] = $chs->Convert($word);
     }
     $totals = $result['total'];
     if (is_array($result["matches"])) {
         $tids = '';
         foreach ($result["matches"] as $docinfo) {
             $tids && ($tids .= ',');
             if (strpos($index, 'tmsgs') !== false || strpos($index, 'threads') !== false) {
                 $tids .= $docinfo['id'];
             } else {
                 $tids .= $docinfo['attrs']['tid'];
             }
         }
         return array($totals, $tids, $words);
     } else {
         return false;
     }
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:23,代码来源:search.class.php


示例15: ecs_iconv

function ecs_iconv($source_lang, $target_lang, $source_string = '')
{
    static $chs = NULL;

    /* 如果字符串为空或者字符串不需要转换,直接返回 */
    if ($source_lang == $target_lang || $source_string == '' || preg_match("/[\x80-\xFF]+/", $source_string) == 0)
    {
        return $source_string;
    }

    if ($chs === NULL)
    {
        require_once(ROOT_PATH . 'includes/cls_iconv.php');
        $chs = new Chinese(ROOT_PATH);
    }

    return $chs->Convert($source_lang, $target_lang, $source_string);
}
开发者ID:Richerjx,项目名称:ecshop,代码行数:18,代码来源:lib_base.php


示例16: seccode_ttffont

function seccode_ttffont()
{
    global $seccode, $seccodedata, $im, $c, $charset;
    $seccoderoot = $seccodedata['type'] ? 'images/fonts/ch/' : 'images/fonts/en/';
    $dirs = opendir($seccoderoot);
    $seccodettf = array();
    while ($entry = readdir($dirs)) {
        if ($entry != '.' && $entry != '..' && strtolower(fileext($entry)) == 'ttf') {
            $seccodettf[] = $entry;
        }
    }
    $seccodelength = 4;
    if ($seccodedata['type'] && !empty($seccodettf)) {
        if (strtoupper($charset) != 'UTF-8') {
            include DISCUZ_ROOT . 'include/chinese.class.php';
            $cvt = new Chinese($charset, 'utf8');
            $seccode = $cvt->Convert($seccode);
        }
        $seccode = array(substr($seccode, 0, 3), substr($seccode, 3, 3));
        $seccodelength = 2;
    }
    $widthtotal = 0;
    for ($i = 0; $i < $seccodelength; $i++) {
        $font[$i]['font'] = $seccoderoot . $seccodettf[array_rand($seccodettf)];
        $font[$i]['angle'] = $seccodedata['angle'] ? mt_rand(-30, 30) : 0;
        $font[$i]['size'] = $seccodedata['type'] ? $seccodedata['width'] / 7 : $seccodedata['width'] / 6;
        $seccodedata['size'] && ($font[$i]['size'] = mt_rand($font[$i]['size'] - $seccodedata['width'] / 40, $font[$i]['size'] + $seccodedata['width'] / 20));
        $box = imagettfbbox($font[$i]['size'], 0, $font[$i]['font'], $seccode[$i]);
        $font[$i]['zheight'] = max($box[1], $box[3]) - min($box[5], $box[7]);
        $box = imagettfbbox($font[$i]['size'], $font[$i]['angle'], $font[$i]['font'], $seccode[$i]);
        $font[$i]['height'] = max($box[1], $box[3]) - min($box[5], $box[7]);
        $font[$i]['hd'] = $font[$i]['height'] - $font[$i]['zheight'];
        $font[$i]['width'] = max($box[2], $box[4]) - min($box[0], $box[6]) + mt_rand(0, $seccodedata['width'] / 8);
        $font[$i]['width'] = $font[$i]['width'] > $seccodedata['width'] / $seccodelength ? $seccodedata['width'] / $seccodelength : $font[$i]['width'];
        $widthtotal += $font[$i]['width'];
    }
    $x = mt_rand($font[0]['angle'] > 0 ? cos(deg2rad(90 - $font[0]['angle'])) * $font[0]['zheight'] : 1, $seccodedata['width'] - $widthtotal);
    !$seccodedata['color'] && ($text_color = imagecolorallocate($im, $c[0], $c[1], $c[2]));
    for ($i = 0; $i < $seccodelength; $i++) {
        if ($seccodedata['color']) {
            $c = array(mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
            $seccodedata['shadow'] && ($text_shadowcolor = imagecolorallocate($im, 255 - $c[0], 255 - $c[1], 255 - $c[2]));
            $text_color = imagecolorallocate($im, $c[0], $c[1], $c[2]);
        } elseif ($seccodedata['shadow']) {
            $text_shadowcolor = imagecolorallocate($im, 255 - $c[0], 255 - $c[1], 255 - $c[2]);
        }
        $y = $font[0]['angle'] > 0 ? mt_rand($font[$i]['height'], $seccodedata['height']) : mt_rand($font[$i]['height'] - $font[$i]['hd'], $seccodedata['height'] - $font[$i]['hd']);
        $seccodedata['shadow'] && imagettftext($im, $font[$i]['size'], $font[$i]['angle'], $x + 1, $y + 1, $text_shadowcolor, $font[$i]['font'], $seccode[$i]);
        imagettftext($im, $font[$i]['size'], $font[$i]['angle'], $x, $y, $text_color, $font[$i]['font'], $seccode[$i]);
        $x += $font[$i]['width'];
    }
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:52,代码来源:seccode.php


示例17: diconv

function diconv($str, $in_charset, $out_charset = CHARSET, $ForceTable = FALSE)
{
    global $_G;
    $in_charset = strtoupper($in_charset);
    $out_charset = strtoupper($out_charset);
    if (empty($str) || $in_charset == $out_charset) {
        return $str;
    }
    $out = '';
    if (!$ForceTable) {
        if (function_exists('iconv')) {
            $out = iconv($in_charset, $out_charset . '//IGNORE', $str);
        } elseif (function_exists('mb_convert_encoding')) {
            $out = mb_convert_encoding($str, $out_charset, $in_charset);
        }
    }
    if ($out == '') {
        $chinese = new Chinese($in_charset, $out_charset, true);
        $out = $chinese->Convert($str);
    }
    return $out;
}
开发者ID:dalinhuang,项目名称:healthshop,代码行数:22,代码来源:function_core.php


示例18: export_to_csv

 /**
  * 导出csv文件
  *
  * @param array $data 数据(如果需要,列标题也包含在这里)
  * @param string $filename 文件名(不含扩展名)
  * @param string $to_charset 目标编码
  */
 function export_to_csv($data, $filename, $to_charset = '')
 {
     if ($to_charset && $to_charset != 'utf-8') {
         $need_convert = true;
         import('iconv.lib');
         $iconv = new Chinese(ROOT_PATH . '/');
     } else {
         $need_convert = false;
     }
     header("Content-type: application/unknown");
     header("Content-Disposition: attachment; filename={$filename}.csv");
     foreach ($data as $row) {
         foreach ($row as $key => $col) {
             if ($need_convert) {
                 $col = $iconv->Convert('utf-8', $to_charset, $col);
             }
             $row[$key] = $this->_replace_special_char($col);
         }
         echo join(',', $row) . "\r\n";
     }
 }
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:28,代码来源:app.base.php


示例19: dirname

require_once dirname(__FILE__) . "/" . "global.php";
//header('Content-Type: text/html; charset=utf-8');
if ($fileData) {
    if (!$lfjid) {
        //showerr("你还没登录",1);
    }
    //其中..与/开头都是不允许的
    if (!ereg("^[0-9a-z_/]+\$", $dir) || ereg("^/", $dir)) {
        $dir = "other";
    }
    $updir = '';
    $path = "{$updir}/{$dir}";
    $array[name] = is_array($fileData) ? $_FILES[fileData][name] : $fileData_name;
    require_once ROOT_PATH . "inc/class.chinese.php";
    $cnvert = new Chinese("UTF8", "GB2312", $array[name], ROOT_PATH . "./inc/gbkcode/");
    $array[name] = $cnvert->ConvertIT();
    $array[path] = $webdb[updir] . "/" . $path;
    $array[size] = is_array($fileData) ? $_FILES[fileData][size] : $fileData_size;
    //$array[updateTable]=1;	//统计用户上传的文件占用空间大小
    $lfjuid = $userdb[uid];
    //处理上传的文件名标志
    $filename = upfile(is_array($fileData) ? $_FILES[fileData][tmp_name] : $fileData, $array);
    $newfile = "{$webdb['www_url']}/{$webdb['updir']}/{$dir}/{$filename}";
    //插入数据,关闭层
    echo '<html>';
    echo '<head>';
    echo '<title>Insert Image</title>';
    echo '<meta http-equiv="content-type" content="text/html; charset=gb2312">';
    echo '</head>';
    echo '<body>';
开发者ID:GHubgenius,项目名称:qbbj,代码行数:30,代码来源:upfile_eweb.php


示例20: invite_payurl

function invite_payurl($amount, $price, &$orderid, $bank = 'DEFAULT')
{
    include_once DISCUZ_ROOT . './source/class/class_chinese.php';
    global $_G;
    $date = dgmdate(TIMESTAMP, 'YmdHis');
    $suffix = dgmdate(TIMESTAMP, 'His') . rand(1000, 9999);
    $transaction_id = DISCUZ_PARTNER . $date . $suffix;
    $orderid = dgmdate(TIMESTAMP, 'YmdHis') . random(14);
    $chinese = new Chinese(strtoupper(CHARSET), 'GBK');
    $subject = $chinese->Convert(lang('forum/misc', 'invite_forum_payment') . '_' . intval($amount) . '_' . lang('forum/misc', 'invite_forum_payment_unit') . '_(' . $_G['clientip'] . ')');
    $reqHandler = new RequestHandler();
    $reqHandler->setGateURL("https://gw.tenpay.com/gateway/pay.htm");
    $reqHandler->init();
    $reqHandler->setKey(DISCUZ_SECURITYCODE);
    $reqHandler->setParameter("partner", DISCUZ_PARTNER);
    $reqHandler->setParameter("out_trade_no", $orderid);
    $reqHandler->setParameter("total_fee", $price * 100);
    $reqHandler->setParameter("return_url", $_G['siteurl'] . 'api/trade/notify_invite.php');
    $reqHandler->setParameter("notify_url", $_G['siteurl'] . 'api/trade/notify_invite.php');
    $reqHandler->setParameter("body", $subject);
    $reqHandler->setParameter("bank_type", $bank);
    $reqHandler->setParameter("spbill_create_ip", $_G['clientip']);
    $reqHandler->setParameter("fee_type", "1");
    $reqHandler->setParameter("subject", $subject);
    $reqHandler->setParameter("sign_type", "MD5");
    $reqHandler->setParameter("service_version", "1.0");
    $reqHandler->setParameter("input_charset", "GBK");
    $reqHandler->setParameter("sign_key_index", "1");
    $reqHandler->setParameter("attach", "tenpay");
    $reqHandler->setParameter("time_start", $date);
    $reqHandler->setParameter("trade_mode", "1");
    $reqHandler->setParameter("trans_type", "1");
    $reqHandler->setParameter("agentid", DISCUZ_AGENTID);
    $reqHandler->setParameter("agent_type", "2");
    $reqUrl = $reqHandler->getRequestURL();
    return $reqUrl;
}
开发者ID:softhui,项目名称:discuz,代码行数:37,代码来源:api_tenpay.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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