•             $file  = 'sample.zip';
                $file_path  = $file;
                $path_parts = pathinfo( $file_path );
                $file_name  = $path_parts['basename'];
                $file       = @fopen( $file_path,"rb" );
                 if ( $file )
                                {
                                    header("Cache-Control: public");
                                    header("Pragma: public");
                                    header("Expires: 0...

    Tags:
    PHP
  • $dir = "Attachments/";
                $files=array();
               
                if ($dh = opendir($dir)) {
                    while (($file = readdir($dh)) !== false) {
                                              $files[]= $file;
                                    }
                    closedir($dh);
                }

    print_r($files)

    Tags:
    PHP
  • $images="Attachments/abc.jpg";
    unlink($images);

    Tags:
    PHP

Pages

X