Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wp_redirect( $new_file_url );
- exit;
- header( 'Content-Transfer-Encoding: Binary' );
- header( 'Content-Disposition: attachment; filename="pdf.pdf"' );
- // From saved file
- readfile( $file_path );
- // OR from memory
- echo $file_contents;
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement