Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Force download of the file
- header( 'Content-Description: File Transfer' );
- header( 'Content-Type: application/octet-stream' );
- header( 'Content-Disposition: attachment; filename=' . basename( $file_path ) );
- header( 'Content-Transfer-Encoding: binary' );
- header( 'Expires: 0' );
- header( 'Cache-Control: must-revalidate' );
- header( 'Pragma: public' );
- header( 'Content-Length: ' . filesize( $file_path ) );
- readfile( $file_path );
Add Comment
Please, Sign In to add comment