Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-16-2018, 09:02 AM   #1
ajaxdns
Registered User
 
Join Date: Apr 2018
Posts: 1,360
Code to open file download dialog in PHP ?

You can open a file download dialog in php by setting Content-Disposition in header.

Here is a usage sample:-


// outputting a PDF file
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ajaxdns is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Xbox Live 24 Hour Trial. Free Redeem Code For Xbox Live Gold Memberships Juliestadeva General Discussion 0 07-09-2018 07:09 AM
Xbox Live Code Generator Download. Xbox Live Membership 12 Months Argos Juliestadeva General Discussion 0 07-08-2018 03:09 AM
Xbox Live Where To Enter Code. Xbox Live Download Stops At 99 ChorlesErads General Discussion 0 06-17-2018 11:49 PM
Code to open file download dialog in PHP ? sydneyearplug PHP / mySQL 0 05-30-2018 09:39 PM
Free $20 Steam Wallet Code Nedir. Steam Gift Card Generator No Survey No Download WendezSob General Discussion 0 04-14-2018 01:47 AM


All times are GMT -7. The time now is 08:10 PM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.