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

PHP gbk_to_utf8函数代码示例

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

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



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

示例1: convert

 /**
  * Convert encoding
  *
  * @param $value
  * @param $to
  * @param $from
  *
  * @return string
  */
 public static function convert($value, $to, $from)
 {
     if ($value == null) {
         return $value;
     }
     //有ccode库
     $isccode = function_exists('is_gbk');
     //专门有处理gbk/utf8转码的扩展,解决一些badcase
     if ($to === 'GBK' && ($from === 'UTF-8' || $from === 'UTF8') && $isccode) {
         $v = utf8_to_gbk($value, strlen($value), UCONV_INVCHAR_REPLACE);
         if ($v !== false) {
             return $v;
         } else {
             Logger::warn("utf8_to_gbk fail str=%s", bin2hex($value));
         }
     }
     if (($to === 'UTF-8' || $to === 'UTF8') && $from === 'GBK' && $isccode) {
         $v = gbk_to_utf8($value, strlen($value), UCONV_INVCHAR_REPLACE);
         if ($v !== false) {
             return $v;
         } else {
             Logger::warn("gbk_to_utf8 fail str=%s", bin2hex($value));
         }
     }
     //return mb_convert_encoding($value,$to,$from);
     //mb_convert会由于字符编码问题出fatal,改成iconv //ignore模式
     return iconv($from, $to . '//ignore', $value);
 }
开发者ID:huimang,项目名称:wisphp,代码行数:37,代码来源:Encoding.php


示例2: convertfile

 function convertfile($in_charset, $out_charset, $str)
 {
     if (function_exists('mb_convert_encoding')) {
         if (empty($in_charset)) {
             $encode_arr = array('UTF-8', 'ASCII', 'GBK', 'GB2312', 'BIG5', 'JIS', 'eucjp-win', 'sjis-win', 'EUC-JP');
             $encoded = mb_detect_encoding($str, $encode_arr);
             if (!empty($encoded)) {
                 $in_charset = $encoded;
             }
         }
         echo $in_charset;
         return mb_convert_encoding($str, $out_charset, $in_charset);
     } else {
         require_once PATH . 'include/charset.func.php';
         $in_charset = strtoupper($in_charset);
         $out_charset = strtoupper($out_charset);
         if ($in_charset == 'UTF-8' && ($out_charset == 'GBK' || $out_charset == 'GB2312')) {
             return utf8_to_gbk($str);
         }
         if (($in_charset == 'GBK' || $in_charset == 'GB2312') && $out_charset == 'UTF-8') {
             return gbk_to_utf8($str);
         }
         return $str;
     }
 }
开发者ID:tanny2015,项目名称:DataStructure,代码行数:25,代码来源:spider_class.php


示例3: gbk_to_utf8

 /**
  * gbk字符转utf8字符
  * @param void $data
  * @return void
  */
 public static function gbk_to_utf8($data)
 {
     foreach ($data as $k => $v) {
         if (is_array($v)) {
             $data[$k] = gbk_to_utf8($v);
         } else {
             $data[$k] = iconv('gbk', 'utf-8', $v);
         }
     }
     return $data;
 }
开发者ID:com-itzcy,项目名称:hdjob,代码行数:16,代码来源:string.class.php


示例4: report_deal

                    $members_handsel_arr['addtime'] = $time;
                    $db->inserttable(table("members_handsel"), $members_handsel_arr);
                    report_deal($_SESSION['uid'], $points_rule['apply_jobs']['type'], $points_rule['apply_jobs']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $points_rule['apply_jobs']['type'] == "1" ? "+" : "-";
                    write_memberslog($_SESSION['uid'], 2, 9001, $_SESSION['username'], "投递了简历,职位:{$jobs['jobs_name']},({$operator}{$points_rule['apply_jobs']['value']}),(剩余:{$user_points})", 2, 1301, "申请职位", "{$operator}{$points_rule['apply_jobs']['value']}", "{$user_points}");
                } else {
                    write_memberslog($_SESSION['uid'], 2, 1301, $_SESSION['username'], "投递了简历,职位:{$jobs['jobs_name']}");
                }
            }
            //微信
            if (intval($_CFG['weixin_apiopen']) == 1 && $weixinconfig['set_applyjobs'] == '1') {
                $user = $db->getone("select weixin_openid from " . table('members') . " where uid = {$jobs['uid']} limit 1");
                if ($user['weixin_openid'] != "") {
                    $resume_url = $_CFG['wap_domain'] . "/resume-show.php?id=" . $resumeid;
                    $template = array('touser' => $user['weixin_openid'], 'template_id' => "u_yoFifHb-ryYXMtNSlATj_Wfm1CWTKEjf8EkiM6dvY", 'url' => $resume_url, 'topcolor' => "#7B68EE", 'data' => array('first' => array('value' => urlencode(gbk_to_utf8("你收到了一份新简历,请及时登录" . $_CFG['site_name'] . "查阅")), 'color' => "#743A3A"), 'job' => array('value' => urlencode(gbk_to_utf8($jobs['jobs_name'])), 'color' => "#743A3A"), 'resuname' => array('value' => urlencode(gbk_to_utf8("--")), 'color' => "#743A3A"), 'realname' => array('value' => urlencode(gbk_to_utf8($personal_fullname)), 'color' => "#743A3A"), 'exp' => array('value' => urlencode(gbk_to_utf8($resume_basic['experience_cn'])), 'color' => "#743A3A"), 'lastjob' => array('value' => urlencode(gbk_to_utf8("--")), 'color' => "#743A3A"), 'remark' => array('value' => urlencode("\\n" . $notes), 'color' => "#743A3A")));
                    send_template_message(urldecode(json_encode($template)));
                }
            }
            exit("ok");
        } else {
            exit("err");
        }
    }
} elseif ($act == 'apply_del') {
    $yid = !empty($_POST['id']) ? $_POST['id'] : exit("请选择删除项目!");
    $n = del_jobs_apply($yid, $_SESSION['uid']);
    if (intval($n) > 0) {
        exit("ok");
    } else {
        exit("err");
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:apply.php


示例5: exit

     exit("-7");
 }
 require_once QISHI_ROOT_PATH . 'include/upload.php';
 !$_FILES['resume_img']['name'] ? exit('请上传图片!') : "";
 $datedir = date("Y/m/d/");
 $up_dir = "../../data/photo/" . $datedir;
 make_dir($up_dir);
 $setsqlarr['img'] = _asUpFiles($up_dir, "resume_img", 800, 'gif/jpg/bmp/png/jpeg', true);
 if ($setsqlarr['img']) {
     // 新增打水印
     if (extension_loaded('gd')) {
         include_once QISHI_ROOT_PATH . 'include/watermark.php';
         $font_dir = QISHI_ROOT_PATH . "data/contactimgfont/cn.ttc";
         if (file_exists($font_dir)) {
             $tpl = new watermark();
             $tpl->img($up_dir . $setsqlarr['img'], gbk_to_utf8($_CFG['site_name']), $font_dir, 13, 0);
         }
     }
     $img_src = $up_dir . $setsqlarr['resume_img'];
     makethumb($img_src, $up_dir, 600, 600);
     $setsqlarr['uid'] = $uid;
     $setsqlarr['resume_id'] = $pid;
     $setsqlarr['addtime'] = time();
     $setsqlarr['img'] = $datedir . $setsqlarr['img'];
     $img_id = $db->inserttable(table('resume_img'), $setsqlarr, true);
     if ($img_id > 0) {
         perfect_resume($_SESSION['uid'], $_SESSION['username'], $pid, 1);
         $data['save_url'] = $setsqlarr['img'];
         $data['url'] = $setsqlarr['img'];
         $data['title'] = $setsqlarr['title'];
         $data['addtime'] = date('Y-m-d', $setsqlarr['addtime']);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:personal_resume.php


示例6: set_order_msg

function set_order_msg($uid, $keyword1, $keyword2, $keyword3)
{
    global $db, $_CFG;
    $weixinconfig = get_cache('weixin_config');
    if (intval($_CFG['weixin_apiopen']) == 1 && $weixinconfig['set_payment'] == '1') {
        $user = $db->getone("select weixin_openid from " . table('members') . " where uid ={$uid} limit 1");
        if ($user['weixin_openid'] != "") {
            $template = array('touser' => $user['weixin_openid'], 'template_id' => "UxurRCK19QNDb3_g2lO5GSQ4lHO48-d1idxBYvutbBc", 'url' => '', 'topcolor' => "#7B68EE", 'data' => array('first' => array('value' => urlencode(gbk_to_utf8("尊敬的用户,您有以下订单需要完成支付:")), 'color' => "#743A3A"), 'keyword1' => array('value' => urlencode(gbk_to_utf8($keyword1)), 'color' => "#743A3A"), 'keyword2' => array('value' => urlencode(gbk_to_utf8($keyword2)), 'color' => "#743A3A"), 'keyword3' => array('value' => urlencode(gbk_to_utf8($keyword3)), 'color' => "#743A3A"), 'keyword4' => array('value' => urlencode(gbk_to_utf8(date('Y-m-d', time()))), 'color' => "#743A3A"), 'remark' => array('value' => urlencode("\\n您可以查看该订单后支付。"), 'color' => "#743A3A")));
            send_template_message(urldecode(json_encode($template)));
        }
    }
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:12,代码来源:fun_weixin.php


示例7: showmsg

    require_once QISHI_ROOT_PATH . 'include/upload.php';
    $setsqlarr['audit'] = 2;
    //添加默认审核中..
    !$_FILES['photo_img']['name'] ? showmsg('请上传照片!', 1) : "";
    $photo_dir = "../../data/hunter/" . date("Y/m/d/");
    make_dir($photo_dir);
    $setsqlarr['photo_img'] = _asUpFiles($photo_dir, "photo_img", $_CFG['resume_photo_max'], 'gif/jpg/bmp/png', true);
    if ($setsqlarr['photo_img']) {
        /*
        	3.5新增打水印start
        */
        if (extension_loaded('gd')) {
            include_once QISHI_ROOT_PATH . 'include/watermark.php';
            $font_dir = QISHI_ROOT_PATH . "data/contactimgfont/cn.ttc";
            if (file_exists($font_dir)) {
                $tpl = new watermark();
                $tpl->img($photo_dir . $setsqlarr['photo_img'], gbk_to_utf8($_CFG['site_name']), $font_dir, 15, 0);
            }
        }
        /*
        	3.5新增end
        */
        $setsqlarr['photo_img'] = date("Y/m/d/") . $setsqlarr['photo_img'];
        $auth = $hunter_profile;
        @unlink("../../data/hunter/" . $auth['photo_img']);
        !$db->updatetable(table('hunter_profile'), $setsqlarr, " id='" . intval($hunter_profile['id']) . "' AND uid='" . intval($_SESSION['uid']) . "'") ? showmsg("保存失败!", 0) : showmsg("保存成功!", 2);
    } else {
        showmsg('保存失败!', 1);
    }
}
unset($smarty);
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:hunter_info.php


示例8: exit_word_message

 private function exit_word_message($word, $fromUsername, $toUsername, $time)
 {
     $word = gbk_to_utf8($word);
     $text = "<xml>\n\t\t<ToUserName><![CDATA[" . $fromUsername . "]]></ToUserName>\n\t\t<FromUserName><![CDATA[" . $toUsername . "]]></FromUserName>\n\t\t<CreateTime>" . $time . "</CreateTime>\n\t\t<MsgType><![CDATA[text]]></MsgType>\n\t\t<Content><![CDATA[" . $word . "]]></Content>\n\t\t</xml> ";
     exit($text);
 }
开发者ID:dalinhuang,项目名称:yy,代码行数:6,代码来源:weixin.php


示例9: convert

/**
 * 编码转换函数
 * @param  $str 
 * @param  $from 
 * @param  $to
 * @return string
 */
function convert($str, $from = 'gbk', $to = 'utf-8')
{
    if (!$str) {
        return '';
    }
    if (strtolower($from) == strtolower($to)) {
        return $str;
    }
    $to = str_replace('gb2312', 'gbk', strtolower($to));
    $from = str_replace('gb2312', 'gbk', strtolower($from));
    if ($form == 'gbk' && $to == 'utf-8') {
        return gbk_to_utf8($str);
    } elseif ($form == 'utf-8' && $to == 'gbk') {
        return utf8_to_gbk($str);
    } else {
        return $str;
    }
}
开发者ID:kennyhonghui,项目名称:zhuoxi,代码行数:25,代码来源:function.php


示例10: showmsg

 $setsqlarr['audit'] = 2;
 //添加默认审核中..
 !$_FILES['certificate_img']['name'] ? showmsg('请上传图片!', 1) : "";
 $certificate_dir = "../../data/" . $_CFG['updir_certificate'] . "/" . date("Y/m/d/");
 make_dir($certificate_dir);
 $setsqlarr['certificate_img'] = _asUpFiles($certificate_dir, "certificate_img", $_CFG['certificate_max_size'], 'gif/jpg/bmp/png', true);
 if ($setsqlarr['certificate_img']) {
     /*
     	3.5新增打水印start
     */
     if (extension_loaded('gd')) {
         include_once QISHI_ROOT_PATH . 'include/watermark.php';
         $font_dir = QISHI_ROOT_PATH . "data/contactimgfont/cn.ttc";
         if (file_exists($font_dir)) {
             $tpl = new watermark();
             $tpl->img($certificate_dir . $setsqlarr['certificate_img'], gbk_to_utf8($_CFG['site_name']), $font_dir, 15, 0);
         }
     }
     /*
     	3.5新增end
     */
     $setsqlarr['certificate_img'] = date("Y/m/d/") . $setsqlarr['certificate_img'];
     $auth = $company_profile;
     @unlink("../../data/" . $_CFG['updir_certificate'] . "/" . $auth['certificate_img']);
     $wheresql = "uid='" . $_SESSION['uid'] . "'";
     write_memberslog($_SESSION['uid'], 1, 8002, $_SESSION['username'], "上传了营业执照");
     updatetable(table('jobs'), array('company_audit' => 2), $wheresql);
     updatetable(table('jobs_tmp'), array('company_audit' => 2), $wheresql);
     !updatetable(table('company_profile'), $setsqlarr, $wheresql) ? showmsg('保存失败!', 1) : showmsg('保存成功,请耐心等待管理员审核!', 2);
 } else {
     showmsg('保存失败!', 1);
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:company_info.php


示例11: elseif

        }
    }
} elseif ($act == 'edit_credent') {
    $uid = intval($_SESSION['uid']);
    $pid = intval($_REQUEST['pid']);
    if ($uid == 0 || $pid == 0) {
        exit('简历不存在!');
    }
    $resume_basic = get_resume_basic(intval($_SESSION['uid']), intval($_REQUEST['pid']));
    if (empty($resume_basic)) {
        exit("请先填写简历基本信息!");
    }
    $id = intval($_GET['id']) ? intval($_GET['id']) : exit('参数错误!');
    $credent_edit = get_resume_credent_one($_SESSION['uid'], $pid, $id);
    foreach ($credent_edit as $key => $value) {
        $credent_edit[$key] = gbk_to_utf8($value);
    }
    $json_encode = json_encode($credent_edit);
    exit($json_encode);
} elseif ($act == 'del_credent') {
    $id = intval($_GET['id']);
    $sql = "select * from " . table('resume_credent') . " where id='" . $id . "' AND uid='" . intval($_SESSION['uid']) . "'  LIMIT 1 ";
    $credent_one = $db->getone($sql);
    $images = $credent_one['images'];
    @unlink('../../data/credent_photo/' . $images);
    $sql = "Delete from " . table('resume_credent') . " WHERE id='{$id}'  AND uid='" . intval($_SESSION['uid']) . "' AND pid='" . intval($_REQUEST['pid']) . "' LIMIT 1 ";
    if ($db->query($sql)) {
        check_resume($_SESSION['uid'], intval($_REQUEST['pid']));
        //更新简历完成状态
        exit('删除成功!');
    } else {
开发者ID:source-hunter,项目名称:74cms,代码行数:31,代码来源:personal_resume.php


示例12: dfopen

        dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_invite&companyname={$jobs['companyname']}&mobile={$resume_user['mobile']}");
    }
    //站内信
    if ($pms_notice == '1') {
        $user = $db->getone("select username from " . table('members') . " where uid ={$resume['uid']} limit 1");
        $jobs_url = url_rewrite('QS_jobsshow', array('id' => $jobs['id']));
        $company_url = url_rewrite('QS_companyshow', array('id' => $jobs['company_id']));
        $message = $jobs['companyname'] . "邀请您参加公司面试,面试职位:<a href=\"{$jobs_url}\" target=\"_blank\"> {$jobs['jobs_name']} </a>,<a href=\"{$company_url}\" target=\"_blank\">点击查看公司详情</a>";
        write_pmsnotice($resume['uid'], $user['username'], $message);
    }
    //微信
    if (intval($_CFG['weixin_apiopen']) == 1) {
        $user = $db->getone("select weixin_openid from " . table('members') . " where uid ={$resume['uid']} limit 1");
        if ($user['weixin_openid'] != "") {
            $jobs_url = $_CFG['wap_domain'] . "/wap-jobs-show.php?id=" . $jobs['id'];
            $template = array('touser' => $user['weixin_openid'], 'template_id' => "sdjPV1l3vyv_9mclCe6_Fm8UzyAadMI_w5iIC1DPFPE", 'url' => $jobs_url, 'topcolor' => "#7B68EE", 'data' => array('first' => array('value' => urlencode(gbk_to_utf8($jobs['companyname'] . "邀请您参加公司面试")), 'color' => "#743A3A"), 'job' => array('value' => urlencode(gbk_to_utf8($jobs['jobs_name'])), 'color' => "#743A3A"), 'company' => array('value' => urlencode(gbk_to_utf8($jobs['companyname'])), 'color' => "#743A3A"), 'time' => array('value' => urlencode(gbk_to_utf8("请点击查看")), 'color' => "#743A3A"), 'address' => array('value' => urlencode(gbk_to_utf8($jobs['contact']['address'])), 'color' => "#743A3A"), 'contact' => array('value' => urlencode(gbk_to_utf8($jobs['contact']['contact'])), 'color' => "#743A3A"), 'tel' => array('value' => urlencode($jobs['contact']['telephone']), 'color' => "#743A3A"), 'remark' => array('value' => urlencode("\\n" . $notes), 'color' => "#743A3A")));
            send_template_message(urldecode(json_encode($template)));
        }
    }
    exit("ok");
}
//获取职位或者简历的所属UID
function get_uid($aid, $type = 'jobs')
{
    global $db;
    if ($type == 'resume') {
        $table = table('resume');
    } else {
        $table = table('jobs');
    }
    $row = $db->getone("Select uid From {$table} Where id={$aid} LIMIT 1");
开发者ID:source-hunter,项目名称:74cms,代码行数:31,代码来源:wap_ajax.php


示例13: gbk_to_utf8

function gbk_to_utf8($arr)
{
    if (empty($arr)) {
        return false;
    }
    if (is_array($arr)) {
        foreach ($arr as $key => $value) {
            $key = mb_convert_encoding($key, 'UTF-8', 'GBK');
            $arr[$key] = gbk_to_utf8($value);
        }
    } else {
        $arr = mb_convert_encoding($arr, 'UTF-8', 'GBK');
    }
    return $arr;
}
开发者ID:relunctance,项目名称:Relunctance,代码行数:15,代码来源:Function.php


示例14: iv_iconv

 function iv_iconv($in_charset, $out_charset, $str)
 {
     $in_charset = strtoupper($in_charset);
     $out_charset = strtoupper($out_charset);
     if (function_exists('mb_convert_encoding')) {
         return mb_convert_encoding($str, $out_charset, $in_charset);
     } else {
         $CI =& get_instance();
         $CI->load->helper('iconv');
         $in_charset = strtoupper($in_charset);
         $out_charset = strtoupper($out_charset);
         if ($in_charset == 'UTF-8' && ($out_charset == 'GBK' || $out_charset == 'GB2312')) {
             return utf8_to_gbk($str);
         }
         if (($in_charset == 'GBK' || $in_charset == 'GB2312') && $out_charset == 'UTF-8') {
             return gbk_to_utf8($str);
         }
         return $str;
     }
 }
开发者ID:zydj333,项目名称:hualiangcaifu,代码行数:20,代码来源:global_helper.php


示例15: exit

    $pid = $db->inserttable(table('jobs_templates'), $setsqlarr, true);
    if ($pid > 0) {
        exit("1");
    } else {
        exit("0");
    }
} elseif ($act == 'copy_templates') {
    $id = intval($_GET['id']);
    if ($id < 1) {
        exit("-1");
    }
    $templates = get_jobs_templates_one($id);
    $templates['contents'] = htmlspecialchars_decode($templates['contents'], ENT_QUOTES);
    if (!empty($templates)) {
        foreach ($templates as $key => $value) {
            $templates[$key] = gbk_to_utf8($value);
        }
        exit(json_encode($templates));
    } else {
        exit("-1");
    }
} elseif ($act == "get_content_by_jobs_cat") {
    $id = intval($_GET['id']);
    if ($id > 0) {
        $content = get_content_by_jobs_cat($id);
        if (!empty($content)) {
            exit($content);
        } else {
            exit("-1");
        }
    } else {
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:company_jobs.php


示例16: send_weixin_msg

function send_weixin_msg($openid, $content, $access_token)
{
    $data_arr = array("touser" => $openid, "msgtype" => "text", "text" => array("content" => urlencode(gbk_to_utf8($content))));
    $data = urldecode(json_encode($data_arr));
    $url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" . $access_token;
    $result = https_request($url, $data);
    return json_decode($result, true);
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:8,代码来源:admin_weixin_fun.php


示例17: transmitText

 private function transmitText($object, $content)
 {
     $xmlTpl = "<xml>\r\n<ToUserName><![CDATA[%s]]></ToUserName>\r\n<FromUserName><![CDATA[%s]]></FromUserName>\r\n<CreateTime>%s</CreateTime>\r\n<MsgType><![CDATA[text]]></MsgType>\r\n<Content><![CDATA[%s]]></Content>\r\n</xml>";
     $content = gbk_to_utf8($content);
     $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time(), $content);
     return $result;
 }
开发者ID:winiceo,项目名称:job,代码行数:7,代码来源:weixin.php


示例18: iconv_js

function iconv_js($string)
{
    if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
        return gbk_to_utf8($string);
    }
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:6,代码来源:ajax_map.php


示例19: iconv

 function iconv($in_charset, $out_charset, $str)
 {
     $in_charset = strtoupper($in_charset);
     $out_charset = strtoupper($out_charset);
     if (function_exists('mb_convert_encoding')) {
         return mb_convert_encoding($str, $out_charset, $in_charset);
     } else {
         pc_base::load_sys_func('iconv');
         $in_charset = strtoupper($in_charset);
         $out_charset = strtoupper($out_charset);
         if ($in_charset == 'UTF-8' && ($out_charset == 'GBK' || $out_charset == 'GB2312')) {
             return utf8_to_gbk($str);
         }
         if (($in_charset == 'GBK' || $in_charset == 'GB2312') && $out_charset == 'UTF-8') {
             return gbk_to_utf8($str);
         }
         return $str;
     }
 }
开发者ID:hw18708118867,项目名称:htmlmoban,代码行数:19,代码来源:global.func.php


示例20: exit

    }
    exit($html);
} elseif ($act == 'edit_training') {
    $uid = intval($_SESSION['uid']);
    $pid = intval($_REQUEST['pid']);
    if ($uid == 0 || $pid == 0) {
        exit('简历不存在!');
    }
    $resume_basic = get_resume_basic(intval($_SESSION['uid']), intval($_REQUEST['pid']));
    if (empty($resume_basic)) {
        exit("请先填写简历基本信息!");
    }
    $id = intval($_GET['id']) ? intval($_GET['id']) : exit('参数错误!');
    $training_edit = get_resume_training_one($_SESSION['uid'], $pid, $id);
    foreach ($training_edit as $key => $value) {
        $training_edit[$key] = gbk_to_utf8($value);
    }
    $json_encode = json_encode($training_edit);
    exit($json_encode);
} elseif ($act == 'del_training') {
    $id = intval($_GET['id']);
    $sql = "Delete from " . table('resume_training') . " WHERE id='{$id}'  AND uid='" . intval($_SESSION['uid']) . "' AND pid='" . intval($_REQUEST['pid']) . "' LIMIT 1 ";
    if ($db->query($sql)) {
        check_resume($_SESSION['uid'], intval($_REQUEST['pid']));
        //更新简历完成状态
        exit('删除成功!');
    } else {
        exit('删除失败!');
    }
} elseif ($act == 'edit_resume') {
    $uid = intval($_SESSION['uid']);
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:personal_resume.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP gc_cache_flags函数代码示例发布时间:2022-05-15
下一篇:
PHP gbk_to_pinyin函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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