16 Filing lecture 3 php

4
File Handling Copyright © 2012 Muhammad Baqar Qazi.

description

 

Transcript of 16 Filing lecture 3 php

Page 1: 16 Filing lecture 3 php

File Handling

Copyright © 2012 Muhammad Baqar Qazi.

Page 2: 16 Filing lecture 3 php

File Uploading

Input Control For File <input type=“file” name=“myfile” />

Form attribute: The enctype attribute specifies how the form-data should be

encoded when submitting it to the server.

Note: The enctype attribute can be used only if method="post".

enctype="multipart/form-data"

Page 3: 16 Filing lecture 3 php

File Uploading

First We need to follow some steps in order to do file uploading.

1.Check For Empty File.

2.Directory exist or Not.

3.File exist or not.

4.File size Restriction.

5.File Extension

6.Move uploaded file.

Page 4: 16 Filing lecture 3 php

Questions?