Why is the pk. php file content not redirected?
Ooo.pdf download
Pku. php file content
Header ("Content-type: application/pdf ");
Header ('content-Disposition: attachment?filename=cute ');
Readfile ("oooworkflow ");
?>
In this example, ooo.htm is the source file, and cute.pdf is the name of the downloaded file.
However, it is strange that the PDF file is downloaded directly when the tag is used in pk. php, and the url is not changed to pku. php.
At least jump to pku. php and then download it ..
Reply to discussion (solution)
Filenameis cute.htm.
The content is ooo.pdf
When you see pku. php in the browser, PHP has generated an html file and sent it to the browser for display.
The current process is that php directly points to this PDF file and passes it to the browser. the browser naturally downloads the file directly.
That's what I understand.
At least change the url address bar to pku. php.
At least change the url address bar to pku. php.
As I said in 2 #, in my opinion, if the address bar can see pku. php: The browser has understood phu. html text generated by php. actually, no, phu. php points to a PDF file that cannot be understood by the browser, so you can download it directly, so you cannot see the php file in the address bar.
This is what I understand and do not know whether it is accurate.
It's the reason for the browser. generally, a blank page should appear.