Home » PHP » PHP – Algorithm to Create a Large Dummy File in Server
PHP

PHP – Algorithm to Create a Large Dummy File in Server

In any case if you want to create a large dummy file in your server for any testing purpose, use the below code to generate in instantly.

For this just create a dummy php file in your server, for eg. dummy-create.php. Then add the following content to it.

Now run the newly created php file in your browser. eg :
http://yourdomain.com/dummy-create.php

Now a new dummy file named dummy-file with provided size will be created in the same folder of your server. Here 2GB file will be created since the size here described as “2 * 1000 * 1000 * 1000” which is 2GB.

About the author

Vipin

Hi, i am Vipin, a programmer working in Dubai, UAE. I love blogging, and so started TechRounder for sharing my findings and other digital informations with others too. Please feel free to share your feedback with me in the comment section below or you can email me at vipin@techrounder.com.

Add Comment

Click here to post a comment

Your email address will not be published. Required fields are marked *

Get latest updates
in your inbox

Subscribe to TechRounder mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.