Expand|Select|Wrap|Line Numbers
- <?php
- $file = 'uploads/.pdf';
- $filename = 'yolo.pdf';
- header('Content-type: application/pdf');
- header('Content-Disposition: inline; filename="' . $filename . '"');
- header('Content-Transfer-Encoding: binary');
- header('Accept-Ranges: bytes');
- @readfile($file);
- ?>
Expand|Select|Wrap|Line Numbers
- $filename = 'yolo.pdf';
For example if i have this record on a table (which displays all the records in a db):
id=1;
name=marley.pdf;
type:pdf;
size:xxx mb;
If i click on the name of the file i want a variable that will get that name and put it into the code.
the code would be something like this:
Expand|Select|Wrap|Line Numbers
- $filename = '$pdfname';
Peace,
Slaxer13