Answers for "php get contents of tempfile"

PHP
1

get contents of a tmp file php

$file = $_FILES['file']['tmp_name']; // It is the path to the file
$data = file_get_contents($file);
Posted by: Guest on May-29-2021
0

how to read from temp files php

<?php$dir = sys_get_temp_dir();$tmp = tempnam($dir, "foo");file_put_contents($tmp, "hello");$f = fopen($tmp, "a");fwrite($f, " world");fclose($f);echo file_get_contents($tmp);
Posted by: Guest on August-05-2021

Browse Popular Code Answers by Language