Php File Upload
Upcoming SlideShare
Loading in...5
×
 

Php File Upload

on

  • 3,307 views

Detail of PHP directives that affects file uploading.

Detail of PHP directives that affects file uploading.

Statistics

Views

Total Views
3,307
Views on SlideShare
3,305
Embed Views
2

Actions

Likes
1
Downloads
17
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Php File Upload Php File Upload Presentation Transcript

  • PHP File uploading post_max_size, upload_max_filesize & memory_limit
  • Write an HTML
    • PHP Documentation
      • http://www.php.net/manual/features.file-upload.php
      • enctype=”multipart/form-data” means “Content-type of HTTP Request is multipart/form-data”
  • PHP Directives post_max_size upload_max_filesize upload_max_filesize PHP 5.2 File File header Part 1 Part 2 Part 3 decode decode HTTP Request HTTP Request Header Content-type: multipart/form-data HTTP Request Body Decoding needs tiny working buffer. The buffer is allocated within memory_limit .
  • PHP Directives
    • At least, you must satisfy
    • memory_limit
      • There are almost no relations with file uploading.
      • If you want to read whole uploaded files in PHP, you'll consume huge memory. But it is another thing from file uploading.
    post_max_size > upload_max_filesize * (how many files) * 1.3 PHP 5.2
  • Appendix. Specifications
    • XHTML
      • http://www.w3.org/TR/xhtml1/
      • See HTML4 spec
    • HTML 4
      • http://www.w3.org/TR/html4/
      • 17.13.4 Form content types
      • See RFC 2388
    • RFC 2388
      • http://www.ietf.org/rfc/rfc2388.txt