當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。