1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Constraint memory used in TAR export

This commit is contained in:
Jakub Vrana
2013-05-01 09:33:23 -07:00
parent 17a8495c2e
commit 601cdd43c1
6 changed files with 33 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
<?php
class TmpFile {
var $handler;
var $size;
function TmpFile() {
$this->handler = tmpfile();
}
function write($contents) {
$this->size += strlen($contents);
fwrite($this->handler, $contents);
}
function send() {
fseek($this->handler, 0);
fpassthru($this->handler);
fclose($this->handler);
}
}