예제 #1
0
 public static function save_response($string)
 {
     if (self::$response_file === FALSE) {
         return;
     }
     if (null === self::$path) {
         self::$path = dirname(__FILE__) . '/../../../log/';
     }
     if (self::$response_file === NULL) {
         self::$response_file = 'response.xml';
     }
     if (substr(self::$response_file, 1, 1) == '=') {
         self::$response_file = $self::$path . '/' . self::$response_file;
     }
     if (!is_writable(self::$response_file) or !file_exists(self::$response_file)) {
         return;
     }
     $fp = fopen($response_file, 'w');
     fwrite($fp, $string);
     fclose($fp);
 }