SlideShare a Scribd company logo
PHP file handling
 Introduction to PHP file handling in Hindi
 Opening a file with PHP in Hindi
 Reading file with PHP in Hindi
 Writing a file with PHP in Hindi
 Closing a file with PHP in Hindi
Introduction to file handling
languages files PHP functions
provide , आप easily files handle Files
handle ability PHP top scripting languages group
web applications database , simple data text
files store प PHP files आप 6
operations perform
 Opening a file
 Reading a file
 Writing a file
 Appending a file
 Closing a file
 Deleting a file
operations PHP perform , आ
Opening a file
Files open PHP fopen() provide method 2
argument pass प argument file , औ आप
mode open mode PHP file ई modes open
modes character represent
modes ग ग operations प
modes
Mode
s
Explanation
r mode files read
r+ mode file read औ file write
w mode files write file प create
w+ mode file read/write operation perform
a mode प file content delete content add
a+ mode आप file read औ data append
x mode आप file data
write file file प error
ग
x+ mode आप read औ write
File operation perform प file
open PHP file open
Opening a file
<?php
$myFile = fopen(“myFile.txt”,”w”);
?>
file open आप file mode
आप open according ई operation perform
Reading from a file
File read आप 2 functions प आप
fread() function function आप file length
प File length pass , compiler प
file content आप filesize()
method आप file pass PHP file read
Reading from a file
<?php
$file1 = fopen(“myFile.txt”,”r+”); // open file
$filesize($file1);
$filedata = fread(“$file1,$filesize”);
?>
Writing to a file
file data store आप fwrite() function
function file pointer औ data pass File pointer variable ,
आप file open point PHP data write
Writing to a file with PHP
<?php
$myFile = fopen(“myFile.txt”, “w”);
fwrite(“myFile”,”This website is cool!”);
?>
Appending to a file
आप existing file data write , file previous data
delete आप previous data delete
end new data add आप file a mode open
औ fwrite() function data आप write
Appending to a file
<?php
$myFile = fopen(“filename.txt”,a); //opening with a mode
fwrite($myFile,”and I am also cool!”);
?>
Closing a file
Operations complete आप file stream close
PHP fclose() method provide method file pointer pass
Closing a file
<?php
$myFile = fopen(“filename.txt”,a); //opening with a mode
// do some operations here
fclose($myFile)
?>
Deleting a file
प आप file delete PHP unlink
method provide
Deleting a file
<?php
$myFile = fopen(“filename.txt”,a); //opening with a mode
//perform some operations here
unlink($myFile)
?>
PHP file handling आप dynamically files handle

More Related Content

What's hot

Php File Operations
Php File OperationsPhp File Operations
Php File Operations
mussawir20
 
Lecture2a algorithm
Lecture2a algorithmLecture2a algorithm
Lecture2a algorithm
mbadhi barnabas
 
Php
PhpPhp
operator overloading & type conversion in cpp
operator overloading & type conversion in cppoperator overloading & type conversion in cpp
operator overloading & type conversion in cpp
gourav kottawar
 
FILES IN C
FILES IN CFILES IN C
FILES IN C
yndaravind
 
Built in function
Built in functionBuilt in function
Built in function
MD. Rayhanul Islam Sayket
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
Arjun Shanka
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
shanmukhareddy dasi
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
Chandan Kumar Rana
 
File handling in c
File handling in cFile handling in c
File handling in c
aakanksha s
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O
YourHelper1
 
Function overloading
Function overloadingFunction overloading
Function overloading
Selvin Josy Bai Somu
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
CPD INDIA
 
File system
File systemFile system
File system
Mohd Arif
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
abclearnn
 
Sed Introduction
Sed IntroductionSed Introduction
Sed Introduction
Anthony Magee
 
File Handling Python
File Handling PythonFile Handling Python
File Handling Python
Akhil Kaushik
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
Ahmed El-Arabawy
 
Php with MYSQL Database
Php with MYSQL DatabasePhp with MYSQL Database
Php with MYSQL Database
Computer Hardware & Trouble shooting
 
Vb basics
Vb basicsVb basics
Vb basics
sagaroceanic11
 

What's hot (20)

Php File Operations
Php File OperationsPhp File Operations
Php File Operations
 
Lecture2a algorithm
Lecture2a algorithmLecture2a algorithm
Lecture2a algorithm
 
Php
PhpPhp
Php
 
operator overloading & type conversion in cpp
operator overloading & type conversion in cppoperator overloading & type conversion in cpp
operator overloading & type conversion in cpp
 
FILES IN C
FILES IN CFILES IN C
FILES IN C
 
Built in function
Built in functionBuilt in function
Built in function
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
File handling in c
File handling in cFile handling in c
File handling in c
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 
File system
File systemFile system
File system
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Sed Introduction
Sed IntroductionSed Introduction
Sed Introduction
 
File Handling Python
File Handling PythonFile Handling Python
File Handling Python
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
 
Php with MYSQL Database
Php with MYSQL DatabasePhp with MYSQL Database
Php with MYSQL Database
 
Vb basics
Vb basicsVb basics
Vb basics
 

Similar to Php file handling in Hindi

Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3
Gheyath M. Othman
 
lecture 10.pptx
lecture 10.pptxlecture 10.pptx
lecture 10.pptx
ITNet
 
file management in c language
file management in c languagefile management in c language
file management in c language
chintan makwana
 
Files in PHP.pptx g
Files in PHP.pptx                      gFiles in PHP.pptx                      g
Files in PHP.pptx g
FiromsaDine
 
Php files
Php filesPhp files
Php files
kalyani66
 
PHP Filing
PHP Filing PHP Filing
PHP Filing
Nisa Soomro
 
File Handling in C
File Handling in CFile Handling in C
File Handling in C
VrushaliSolanke
 
PHP File Handling
PHP File Handling PHP File Handling
PHP File Handling
Degu8
 
Php advance
Php advancePhp advance
Php advance
Rattanjeet Singh
 
Python files / directories part15
Python files / directories  part15Python files / directories  part15
Python files / directories part15
Vishal Dutt
 
Lecture 20 - File Handling
Lecture 20 - File HandlingLecture 20 - File Handling
Lecture 20 - File Handling
Md. Imran Hossain Showrov
 
DIWE - File handling with PHP
DIWE - File handling with PHPDIWE - File handling with PHP
DIWE - File handling with PHP
Rasan Samarasinghe
 
اسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونی
اسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونیاسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونی
اسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونی
Mohammad Reza Kamalifard
 
File handling in c
File handling in cFile handling in c
File handling in c
David Livingston J
 
File handling in C hhsjsjshsjjsjsjs.pptx
File handling in C hhsjsjshsjjsjsjs.pptxFile handling in C hhsjsjshsjjsjsjs.pptx
File handling in C hhsjsjshsjjsjsjs.pptx
armaansohail9356
 
Filing system in PHP
Filing system in PHPFiling system in PHP
Filing system in PHP
Mudasir Syed
 
Php File Operations
Php File OperationsPhp File Operations
Php File Operations
Jamshid Hashimi
 
Unit-VI.pptx
Unit-VI.pptxUnit-VI.pptx
Unit-VI.pptx
Mehul Desai
 
Python Files I_O17.pdf
Python Files I_O17.pdfPython Files I_O17.pdf
Python Files I_O17.pdf
RashmiAngane1
 
Php basics
Php basicsPhp basics
Php basics
sagaroceanic11
 

Similar to Php file handling in Hindi (20)

Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3
 
lecture 10.pptx
lecture 10.pptxlecture 10.pptx
lecture 10.pptx
 
file management in c language
file management in c languagefile management in c language
file management in c language
 
Files in PHP.pptx g
Files in PHP.pptx                      gFiles in PHP.pptx                      g
Files in PHP.pptx g
 
Php files
Php filesPhp files
Php files
 
PHP Filing
PHP Filing PHP Filing
PHP Filing
 
File Handling in C
File Handling in CFile Handling in C
File Handling in C
 
PHP File Handling
PHP File Handling PHP File Handling
PHP File Handling
 
Php advance
Php advancePhp advance
Php advance
 
Python files / directories part15
Python files / directories  part15Python files / directories  part15
Python files / directories part15
 
Lecture 20 - File Handling
Lecture 20 - File HandlingLecture 20 - File Handling
Lecture 20 - File Handling
 
DIWE - File handling with PHP
DIWE - File handling with PHPDIWE - File handling with PHP
DIWE - File handling with PHP
 
اسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونی
اسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونیاسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونی
اسلاید دوم جلسه هفتم کلاس پایتون برای هکرهای قانونی
 
File handling in c
File handling in cFile handling in c
File handling in c
 
File handling in C hhsjsjshsjjsjsjs.pptx
File handling in C hhsjsjshsjjsjsjs.pptxFile handling in C hhsjsjshsjjsjsjs.pptx
File handling in C hhsjsjshsjjsjsjs.pptx
 
Filing system in PHP
Filing system in PHPFiling system in PHP
Filing system in PHP
 
Php File Operations
Php File OperationsPhp File Operations
Php File Operations
 
Unit-VI.pptx
Unit-VI.pptxUnit-VI.pptx
Unit-VI.pptx
 
Python Files I_O17.pdf
Python Files I_O17.pdfPython Files I_O17.pdf
Python Files I_O17.pdf
 
Php basics
Php basicsPhp basics
Php basics
 

More from Vipin sharma

C pdf
C pdfC pdf
Router components in hindi
Router components in hindiRouter components in hindi
Router components in hindi
Vipin sharma
 
Xml namespaces in Hindi
Xml namespaces in Hindi Xml namespaces in Hindi
Xml namespaces in Hindi
Vipin sharma
 
Html font tag in Hindi
Html font tag in Hindi Html font tag in Hindi
Html font tag in Hindi
Vipin sharma
 
Android networking in Hindi
Android networking in Hindi Android networking in Hindi
Android networking in Hindi
Vipin sharma
 
Learn java in hindi
Learn java in hindiLearn java in hindi
Learn java in hindi
Vipin sharma
 

More from Vipin sharma (6)

C pdf
C pdfC pdf
C pdf
 
Router components in hindi
Router components in hindiRouter components in hindi
Router components in hindi
 
Xml namespaces in Hindi
Xml namespaces in Hindi Xml namespaces in Hindi
Xml namespaces in Hindi
 
Html font tag in Hindi
Html font tag in Hindi Html font tag in Hindi
Html font tag in Hindi
 
Android networking in Hindi
Android networking in Hindi Android networking in Hindi
Android networking in Hindi
 
Learn java in hindi
Learn java in hindiLearn java in hindi
Learn java in hindi
 

Recently uploaded

学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 

Recently uploaded (20)

学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 

Php file handling in Hindi

  • 1. PHP file handling  Introduction to PHP file handling in Hindi  Opening a file with PHP in Hindi  Reading file with PHP in Hindi  Writing a file with PHP in Hindi  Closing a file with PHP in Hindi Introduction to file handling languages files PHP functions provide , आप easily files handle Files handle ability PHP top scripting languages group web applications database , simple data text files store प PHP files आप 6 operations perform  Opening a file  Reading a file  Writing a file  Appending a file  Closing a file  Deleting a file operations PHP perform , आ Opening a file Files open PHP fopen() provide method 2 argument pass प argument file , औ आप mode open mode PHP file ई modes open modes character represent
  • 2. modes ग ग operations प modes Mode s Explanation r mode files read r+ mode file read औ file write w mode files write file प create w+ mode file read/write operation perform a mode प file content delete content add a+ mode आप file read औ data append x mode आप file data write file file प error ग x+ mode आप read औ write File operation perform प file open PHP file open Opening a file <?php $myFile = fopen(“myFile.txt”,”w”); ?> file open आप file mode आप open according ई operation perform Reading from a file
  • 3. File read आप 2 functions प आप fread() function function आप file length प File length pass , compiler प file content आप filesize() method आप file pass PHP file read Reading from a file <?php $file1 = fopen(“myFile.txt”,”r+”); // open file $filesize($file1); $filedata = fread(“$file1,$filesize”); ?> Writing to a file file data store आप fwrite() function function file pointer औ data pass File pointer variable , आप file open point PHP data write Writing to a file with PHP <?php $myFile = fopen(“myFile.txt”, “w”); fwrite(“myFile”,”This website is cool!”); ?> Appending to a file
  • 4. आप existing file data write , file previous data delete आप previous data delete end new data add आप file a mode open औ fwrite() function data आप write Appending to a file <?php $myFile = fopen(“filename.txt”,a); //opening with a mode fwrite($myFile,”and I am also cool!”); ?> Closing a file Operations complete आप file stream close PHP fclose() method provide method file pointer pass Closing a file <?php $myFile = fopen(“filename.txt”,a); //opening with a mode // do some operations here fclose($myFile) ?> Deleting a file
  • 5. प आप file delete PHP unlink method provide Deleting a file <?php $myFile = fopen(“filename.txt”,a); //opening with a mode //perform some operations here unlink($myFile) ?> PHP file handling आप dynamically files handle