16 filing lecture 3 php

4
File Handling Copyright © 2012 Muhammad Baqar Qazi.

Upload: raja-kumar

Post on 15-Jan-2015

141 views

Category:

Education


4 download

DESCRIPTION

 

TRANSCRIPT

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?