Hi
I am running this script I found which works fine.
I use it to create a temporary file which I rename to have the pdf extension.
This is the code:
[COLOR=”Lime”]//Determine a temporary file name in the current directory
[COLOR=”red”]$file = basename(tempnam(‘.’, ‘tmp’));
rename($file, $file.’.pdf’);
$file .= ‘.pdf’
[COLOR=”lime”]//Save PDF to file
[COLOR=”red”]$pdf->Output($file, ‘F’);
[COLOR=”lime”]//Redirect
[COLOR=”red”]header(‘Location: ‘.$file);
As I said it works fine but the final name of the file is something like:
[COLOR=”Red”]tmp40C2.tmp.pdf
I was wondering how this is possible if I first rename it and then add the string ‘.pdf’ to the file name.
Following the code, should not be something like this? :
[COLOR=”red”]tmp40C2.tmp.pdf.pdf
Thanks!