Php program causes the disk space to soar

Source: Internet
Author: User
The php program causes the disk space usage to soar. this program instantly causes the cpu and memory usage of my computer to soar. When I look at the space used by the hard disk, it is also increasing. now I am at a loss, what is the hard disk space that cannot be found? The hard disk space cannot be restored. I am a beginner in php. hope you can give me more advice? Asking for help !!!






$ 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 the content that causes the hard drive to use space to soar. For more information, see php Chinese network (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.