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