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


PHP XString::convertUTF8ToGBK方法代码示例

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


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

示例1: doAddBingliToIntention

    public function doAddBingliToIntention($request, $response)
    {/*{{{*/
        $intention = DAL::get()->find('Intention', $request->intentionId);
        DBC::requireTrue(false == $intention->isNull() && $this->user->id == $intention->user->id, '无效数据');

        $content = trim(XString::convertUTF8ToGBK($request->content));
        $paIds = array_filter(explode(',', $request->attachmentIds));
        $newIntention = IntentionClient::getInstance()->replenishFromIntention($intention, Intention::SRC_TOUCH, $content, $paIds);

        $response->setRedirect($response->router->urlfor('intention/intentionlist', array('patientId' => $newIntention->patient->id)));
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:11,代码来源:intentioncontroller.php

示例2: collectMedicineInfo

 private function collectMedicineInfo($request, $response)
 {/*{{{*/
     if(XString::getLengthOfGBKString($_REQUEST['medname'])<1 || XString::getLengthOfGBKString($_REQUEST['medname'])>35)
     {
         throw new BizException('用药名称为必填信息且不能超过35字');
     }
     if(XString::getLengthOfGBKString($_REQUEST['meddesc'])<1 || XString::getLengthOfGBKString($_REQUEST['meddesc'])>100)
     {
         throw new BizException('服用说明必填信息且不能超过100字');
     }
     $medicineName = XString::convertUTF8ToGBK(ltrim($request->medicineName));
     $medicineDesc = XString::convertUTF8ToGBK(ltrim($request->medicineDesc));
     $medicine = BingLiDto::createMedicineDto($medicineName, $medicineDesc);
     return $medicine;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:15,代码来源:newcasecontroller.php

示例3: addOtherInfo4Patient

     public function addOtherInfo4Patient($request, $response)
     {
         $user = $this->user;
         $params = array();                                                            
         $birthday = "{$request->dateyear}-{$request->datemonth}-{$request->dateday}"; 
         $params['birthday'] = $birthday;                                              
         $params['sex'] = $request->sex;                                               
         $params['province'] = XString::convertUTF8ToGBK($request->province);          
         $params['city'] = XString::convertUTF8ToGBK($request->city);                  
         $params['relation'] = $request->relation;                                     
         $medicalCardNo = $request->medicalCardNo; 
         $caseNo = $request->caseNo; 

         $signinId = $request->signinId;
         $patientSignin = DAL::get()->find('patientsignin', $signinId);
         $patientId = $request->patientId;
         PatientClient::getInstance()->modifyInfo($patientId, $params);
         PatientSigninClient::getInstance()->updateMedicalCardNoOrHospitalCaseNO($patientSignin, $user, $medicalCardNo, $caseNo);
         $response->setRedirect($response->router->urlfor('user/talkstodoctor', array('signinId'=>$signinId, 'spaceId'=>$request->spaceId, 'patientId'=>$patientId)));
     }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:20,代码来源:usercontroller.php

示例4: ajaxCheckSensComment

 public function ajaxCheckSensComment($request, $response)
 {/*{{{*/
     $content = XString::convertUTF8ToGBK($request->content);
     $sensContentArr = BeanFinder::get('ContentFilter')->getSensitiveWordsRecursive('comment', $content);
     foreach ($sensContentArr as $key => $sensContent)
     {
         if (preg_match('/(?:\d[\-]?){11}/', $sensContent))
         {
             unset($sensContentArr[$key]);
         }
     }
     $isSens = count($sensContentArr) > 0 ? '1' : '0';
     $res = array('issens' => $isSens);
     echo json_encode($res);
     return parent::DIRECT_OUTPUT;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:16,代码来源:doctorcontroller.php

示例5: saveConditionDesc

 public function saveConditionDesc($request, $response)
 {/*{{{*/
     $_SESSION['telOrderInfo']['desc'] = XString::convertUTF8ToGBK($request->desc);
     return self::DIRECT_OUTPUT;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:5,代码来源:telcontroller.php


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