mirror of
https://github.com/vrana/adminer.git
synced 2026-02-08 15:47:47 +01:00
22 lines
342 B
PHP
22 lines
342 B
PHP
<?php
|
|
namespace Adminer;
|
|
|
|
class TmpFile {
|
|
private $handler, $size;
|
|
|
|
function __construct() {
|
|
$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);
|
|
}
|
|
}
|