改名
This commit is contained in:
+21
-19
@@ -67,27 +67,29 @@ class File
|
|||||||
*/
|
*/
|
||||||
public function getContent(): string
|
public function getContent(): string
|
||||||
{
|
{
|
||||||
$open = fopen($this->getTmpPath(), 'r');
|
// $open = fopen($this->getTmpPath(), 'r');
|
||||||
var_dump($open, file_get_contents('php://temp'));
|
var_dump(file_get_contents('php://temp'));
|
||||||
|
|
||||||
$limit = 1024000;
|
return '';
|
||||||
|
|
||||||
$stat = fstat($open);
|
// $limit = 1024000;
|
||||||
|
//
|
||||||
$sleep = $offset = 0;
|
// $stat = fstat($open);
|
||||||
$content = '';
|
//
|
||||||
while ($file = fread($open, $limit)) {
|
// $sleep = $offset = 0;
|
||||||
$content .= $file;
|
// $content = '';
|
||||||
fseek($open, $offset);
|
// while ($file = fread($open, $limit)) {
|
||||||
if ($sleep > 0) {
|
// $content .= $file;
|
||||||
sleep($sleep);
|
// fseek($open, $offset);
|
||||||
}
|
// if ($sleep > 0) {
|
||||||
if ($offset >= $stat['size']) {
|
// sleep($sleep);
|
||||||
break;
|
// }
|
||||||
}
|
// if ($offset >= $stat['size']) {
|
||||||
$offset += $limit;
|
// break;
|
||||||
}
|
// }
|
||||||
return $content;
|
// $offset += $limit;
|
||||||
|
// }
|
||||||
|
// return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user