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:
21
adminer/include/tmpfile.inc.php
Normal file
21
adminer/include/tmpfile.inc.php
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user