- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
delete() function in PHP
The delete() function deletes a file. The path of the file to be deleted is to be specified as a parameter.
Syntax
delete(file_path)
Parameters
file_path − Specify the path of the file to be deleted.
Return
The delete() function returns.
- True, on success
- False, on failure
Example
The following is an example. This deletes the file “amit.txt” specified as a parameter.
<?php echo delete("E:/list/amit.txt"); ?>
Output
true
Advertisements