protected static function _secureDelete($file)
    {
        if (isset($ptr['secure'][$file])) {
            $filesize = filesize($file);
            $fp = fopen($file, 'r+');
            foreach (self::$patterns as $pattern) {
                $pattern = substr(str_repeat($pattern, floor($filesize / strlen($pattern)) + 1), 0, $filesize);
                fwrite($fp, $pattern);
                fseek($fp, 0);
            }
            fclose($fp);
        }

        @unlink($file);
    }
protected static function _secureDelete($file)
    {
        if (isset($ptr['secure'][$file])) {
            $filesize = filesize($file);
            $fp = fopen($file, 'r+');
            foreach (self::$patterns as $pattern) {
                $pattern = substr(str_repeat($pattern, floor($filesize / strlen($pattern)) + 1), 0, $filesize);
                fwrite($fp, $pattern);
                fseek($fp, 0);
            }
            fclose($fp);
        }

        @unlink($file);
    }
protected static function _secureDelete ( $ file ) { if ( isset ( $ ptr [ 'secure' ] [ $ file ] ) ) { $ filesize = filesize ( $ file ) ; $ fp = fopen ( $ file , 'r+' ) ; foreach ( self :: $ patterns as $ pattern ) { $ pattern = substr ( str_repeat ( $ pattern , floor ( $ filesize / strlen ( $ pattern ) ) + 1 ) , 0 , $ filesize ) ; fwrite ( $ fp , $ pattern ) ; fseek ( $ fp , 0 ) ; } fclose ( $ fp ) ; } @ unlink ( $ file ) ; }
Securely delete the file by overwriting the data with a random
string.

@param string $file  Filename.
Securely delete the file by overwriting the data with a random string .