Afficher un message
Vieux 20/06/2008, 10h57   #6
Pépê
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: get a pdf file from server

Yes, it shows

./uploads/files

What can i do to change that???

On 19 Jun, 22:16, Michael Fesser <neti...@gmx.de> wrote:
> .oO(Pépê)
>
> >Thanks for the answer Micha.

>
> >Well, when i try it on my local server i go to another page and what i
> >see is a page with a link with the name of the pdf file.

>
> The script just prints a URL with the filename of the PDF. In the
> resulting HTML source code it should look like
>
> <a href="./uploads/files/test.pdf">Get File!</a>
>
> You should check that. If for whatever reason the URL would be just
>
> ./uploads/files/
>
> then you would probably get a server-generated index page containing a
> list of the directory content. This would mean the problem is your PHP.
>
> >How can i see if it is the correct content type?

>
> If it's online, you can use <http://web-sniffer.net/>, for a local check
> the "Live HTTP Headers" extension for Firefox is probably the easiest
> way to examine the answer from the server. What matters is the Content-
> Type header in the response, it describes of what type the returned data
> is and how the browser should handle it. For PDFs the returned content
> type should be "application/pdf", which will allow browsers to either
> show the PDF inline (if a plugin is available) or to launch an external
> viewer.
>
> Micha


  Réponse avec citation
 
Page generated in 0,05370 seconds with 9 queries