Home > Backend Development > PHP Tutorial > PHP program causes hard disk space usage to skyrocket

PHP program causes hard disk space usage to skyrocket

黄舟
Release: 2023-03-03 19:00:02
Original
1140 people have browsed it

This program instantly caused the CPU and memory of my computer to skyrocket. When I saw the hard disk space used, it also increased. Now I am at a loss. I can’t find the hard disk space being used? I can't restore the previous hard disk space size. I am a beginner in PHP. I hope you can give me some advice? Help is needed! ! !






$filename="/home/wanbo/test/file/test.txt";
if(file_exists($filename))echo "the file is there.";
else echo "there isn't such a file";
$myfile=fopen($filename,"a+");
fwrite($myfile,"hello,world");
while(!feof($myfile))
{
  $mychar=fgetc( $myfile);
echo $mychar;
}
fclose($myfile);
?>


The above is what the php program causes the hard disk usage space to increase , for more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template