mirror of https://github.com/harish2704/dotFiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
329 B
22 lines
329 B
<?php
|
|
|
|
class TmpFile {
|
|
var $handler;
|
|
var $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);
|
|
}
|
|
|
|
}
|
|
|