Changeset 695 for pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php
- Timestamp:
- Jan 15, 2015 12:08:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php
r689 r695 215 215 { 216 216 error_reporting(E_ALL); 217 217 218 $this->load->model('Services_model'); 218 219 … … 221 222 // get total page 222 223 $totalpage = 1; 224 223 225 $default = $this->Services_model->getCollaborator(2,1,1); 226 227 $data = mb_convert_encoding($default, 'UTF-8'); 228 224 229 if($default){ 225 $xml = simplexml_load_string($d efault);230 $xml = simplexml_load_string($data); 226 231 $xml->registerXPathNamespace("S", "http://schemas.xmlsoap.org/soap/envelope/"); 227 232 $xml = $xml->xpath('//S:Body')[0]; … … 230 235 } 231 236 232 $result = $this->Services_model->getCollaborator(2,1,$totalpage); 237 var_dump($totalpage); 238 239 /*$result = $this->Services_model->getCollaborator(2,1,$totalpage); 233 240 if ($result){ 234 241 $xml = simplexml_load_string($result); … … 258 265 $logMsg = date('Y-m-d H:i:s') . " Result is null \n"; 259 266 write_file('./log/sync_collaborator.log', $logMsg, FOPEN_WRITE_CREATE); 260 } 267 }*/ 261 268 } 262 269 } 270 271 function fix_latin1_mangled_with_utf8_maybe_hopefully_most_of_the_time($str) 272 { 273 return preg_replace_callback('#[\\xA1-\\xFF](?![\\x80-\\xBF]{2,})#', 'utf8_encode_callback', $str); 274 } 275 276 function utf8_encode_callback($m) 277 { 278 return utf8_encode($m[0]); 279 }
Note: See TracChangeset
for help on using the changeset viewer.