delete file in php
unlink(filepath);if(file_exists($file)) {
unlink($file);
} if(file_exists($file)) {
unlink($file);
}/*
Deleting files is a concept in file handeling of PHP
We can remove or delete the file from real folder path using below code
*/
unlink($Your_file_path); // direct deleting the file
/* Delete file if its exist in folder */
if (file_exists($Your_file_path)) {
unlink($Your_file_path);
}
/*
I hope it will help you.
Namaste
*/
Also in PHP:
- Str larav
- date today in datetime php
- create 5 rendom charactors in php
- $this
- capital string php
- Main features of php
- developer polyglots
- basic php
- check if user is on mobile php
- check if after specific position has string php
- SQLSTATE[42000] in laravel
- echo child category
- find curren monday in laravel carbon
- can i refresh page in php
- codeigniter sms send
- Extra header element 'From' cannot be other than string or array. in
- : Allowed memory size of 268435456 bytes exhausted (tried to allocate 77155656 bytes) in /home/gergstor/public_html/seo/application/third_party/MX/Loader.php on line 373 A PHP Error was encountered Severity: Error Message: Allowed memory size of
- check if array has a certain key
- debug php with print
- check value contains numbers or letters php
- convert string to uppercase php
- check if line contains string php
- find php
- check type of variable in php