Special Offer - Get $90 Discount and Host Your Dream Web Site @ Dreamhost for 1 Year Click Here. Promo Code SLJ345
Back To Top
WordPress Web Application Development
Develop Powerfull Web Applications Using Cutting Edge WordPress Development Techniques

Learn PHP Basics – File Uploading Tips

on 2011/06/16 8:12 AM stored in: Uncategorized and tagged:

File Uploading Tips for PHP

In this post I’m going to give you the things to be considered in uploading a file securely using php. Sometimes we make small mistakes in these points and waste lot of time identifying the problem. So i hope this tips will reduce the time of your file uploading code.

 

  • Always use enctype=”multipart/form-data” attribute in your html form.
  • Define the allowed file types to upload and check against the uploaded file.
  • Do not allow executable file types such as exe,php,jsp since any one can directly run the file after uploading and cause damage to your application.
  • Change the php.ini file and set the value of “upload_max_filesize” according to your maximum file size allowed to upload.
  • Provide the write permission to your upload folder.
  • Provide the necessary permission to your uploded files using chmod function.

Leave a Reply

Follow Us On Facebook