Page 185 - Open Soource Technologies 304.indd
P. 185
Open Source Technologies Mandeep Kaur, Lovely Professional University
Notes Unit 11: Directories and Files
CONTENTS
Objectives
Introduction
11.1 Including Files with PHP Include( ) Function
11.2 Validating Files
11.2.1 Checking for Existence with file_exists ()
11.2.2 A File or a Directory?
11.2.3 Checking the Status of a File
11.2.4 Determining File Size with filesize()
11.2.5 Getting Date Information About a File
11.3 Creating File
11.4 Delete File
11.5 Opening a File for Reading
11.6 Writing Files
11.6.1 File Open Write
11.6.2 File Write Fwrite Function
11.6.3 File Write: Overwriting
11.7 Appending Files
11.7.1 File Read
11.7.2 File Open: Read
11.7.3 File Read Fread Function
11.7.4 File Read: Gets Function
11.7.5 When and How to Include Files
11.8 Summary
11.9 Keywords
11.10 Self Assessment Questions
11.11 Review Questions
11.12 Further Reading
Objectives
After studying this unit, you will be able to:
• Discuss including files in include function.
• Explain the validating files.
180 LOVELY PROFESSIONAL UNIVERSITY