Member Avatar for Rahul47

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 !!

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.