Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php remove file

if(file_exists($file)) {
	unlink($file);
} 
Comment

delete file in php

unlink(filepath);
Comment

php delete file

// delete file function, if silent is false, function will throw exception
function deleteFile($fullFileName, $silent=0) {
  if (file_exists($fullFileName)) {
    unlink($fullFileName);
    return TRUE;
  } else {
    if ($silent == 1) {
      return FALSE;
    } else {
      throw new InvalidArgumentException('File "'.$fullFileName.'" not exists.');
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Php :: how to make classess in php 
Php :: unable to open file error in php 
Php :: php json_encode utf8 
Php :: php get highest key in array 
Php :: php How do you remove an array element in a foreach loop? 
Php :: Laravel eloquent upserts 
Php :: laravel slug 
Php :: php destroy session after some time 
Php :: Wordpress admin settings form 
Php :: laravel findorfail 
Php :: php numberformatter currency without symbol 
Php :: laravel request except multiple 
Php :: web api return json example in php 
Php :: show comma separated numbers in php 
Php :: php cheatsheet 
Php :: array associativo php 
Php :: php to list files 
Php :: remove first 4 characters in string php 
Php :: check the ajax request in laravel 
Php :: php echo sql result 
Php :: how to join two tables in laravel 
Php :: store fetched data into array php 
Php :: laravel form old value array 
Php :: laravel eloquent without relation 
Php :: if browser url is having domain name in it check using php 
Php :: php time 
Php :: str_replace smarty template 
Php :: php value to javascript variable laravel blade 
Php :: wc_product_attribute set_options value 
Php :: how to remove keys in subarray php 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =