PHP Limit Upload File Size

Apply limit on file size at loading time using this tutorial or script. This upload form can limit file size.

Overview

In this tutorial create 2 files
1. limit_upload.php
2. limit_upload_ac.php

Step
1. Create file limit_upload.php
2. Create file limit_upload_ac.php
3. Create folder “upload” for store uploaded files.
4. CHMOD your upload folder to “777” by using your ftp software(change permission).

Step1:

Create file limit_upload.php

|—|——————— code ——————–|—|

Step2:

Create file limit_upload_ac.php

|—|——————— code ——————–|—|

Step3:

CHMOD upload folder to 777 (change permission)

This step, do it when you upload to real server. This example, I use CuteFTP, right click at upload folder > FTP Commands > CHMOD

Leave a Reply

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