1,105,290 Community Members

What's Wrong with this Piece of Code ?

Member Avatar
Rahul47
Posting Whiz
340 posts since Jan 2013
Reputation Points: 13 [?]
Q&As Helped to Solve: 20 [?]
Skill Endorsements: 2 [?]
 
0
 

Don't know what's wrong with this code ?? Can anyone figure it out ??

<?php
header('Content-Disposition: attachment; filename="'.$_GET['file'].'"');
header('Content-type: application/pdf');
readfile($_GET['file']);
?>

Thanks !!

Member Avatar
pritaeas
mod_pritaeas
11,287 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,831 [?]
Skill Endorsements: 154 [?]
Moderator
Featured
Sponsor
 
0
 

Technically the code is correct. I assume it's not doing what you want. What do you want to happen, and what is it doing instead?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article