Page 1 of 1

Web page load is corrupted

Posted: Mon Nov 23, 2009 9:39 am
by RIGOLETO
Hi there,

I am open a PDF file, just using the code below, but it is corrupted, anyone has a solution?



<?php

function pdf($name3){

$mi_pdf = $name3;
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$mi_pdf.'"');
readfile($mi_pdf);


}

?>

Posted: Mon Nov 23, 2009 2:14 pm
by Jonah Bron
Check to make sure the PDF isn't corrupt. And, it doesn't look like you call the function in your code.

Remember to use the tags :wink:

Re: Web page load is corrupted

Posted: Tue Nov 24, 2009 3:50 pm
by RIGOLETO
I am callin this from other HTML, I mean that there is a HTML that call my Function

Code: Select all

 
 
<?php
 
function pdf($name3){
 
$mi_pdf = $name3;
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$mi_pdf.'"');
readfile($mi_pdf);
 
 
}
 
?>
Hi there,
 
I am open a PDF file, just using the code below, but it is corrupted, anyone has a solution? 
 
 
[color=#804080]
<?php
 
function pdf($name3){
 
$mi_pdf = $name3;
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$mi_pdf.'"');
readfile($mi_pdf);
 
 
}
 
?>[/color]