Ignore:
Timestamp:
Nov 26, 2014 4:24:07 PM (10 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/libraries/vservices.php

    r629 r630  
    4646
    4747        public function actionExecute ($action, $aryParams = array(), $module = 'space') {
    48                 $this->_curlObj->create($this->_apiUrl. $module .'/'.$action);
     48                $url = $this->_apiUrl. $module .'/'.$action;
     49               
     50                $this->_curlObj->create($url);
    4951                $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
    50                 $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
     52                $this->_curlObj->option(CURLOPT_HEADER, 0);
     53                $this->_curlObj->option(CURLOPT_FAILONERROR, FALSE);
    5154               
    5255                if ($this->_httpUser && $this->_httpPasswd) {
     
    5962                $result = $this->_curlObj->execute();
    6063               
    61                 $logMsg = date('YmdHis') .' - File: '. __FILE__ . ' - line:'. __LINE__ .' - API Result: '. var_export($result, true). ' - Action: '. var_export($this->_apiUrl. $module .'/'.$action, true) .' - PARAMS: '. .var_export($aryParams, true);
     64                $logMsg = date('Y-m-d H:i:s') .' - File: '. __FILE__ . ' - line:'. __LINE__ .' - API Result: '. var_export($result, true). ' - Action: '. var_export($url, true) .' - PARAMS: '. var_export($aryParams, true)."\n";
    6265                write_file('./log/apicalling.log', $logMsg, FOPEN_WRITE_CREATE);
    6366               
Note: See TracChangeset for help on using the changeset viewer.