You are here: Re: What function? « PHP Programming Language « IT news, forums, messages
Re: What function?

Posted by salonowiec on 10/19/07 12:06

Uzytkownik "Jean-Baptiste Nizet" <jnizet@gmail.com> napisal w wiadomosci
news:1192794161.771509.304950@y27g2000pre.googlegroups.com...

> If what you want to do is sending a gif, jpeg, pdf file or whatever
> file to the browser and the browser displays it as it would if you had
> clicked on a direct link to the file, then you must send the mime type
> of the file in the HTTP response:
>
> header("Content-Type: image/gif");
>
> for a gif file, for example.
>
> With direct links, the web server does it automatically, but if you
> want to do it in PHP, you have to do it yourself. Read the user
> comments on http://www.php.net/readfile to see some examples.
>
> JB.
>
It's working good with this header function, it displays O. K. There is
another question (I'm probably stubborn): the address line shows something
like http://www.xxx/vvv/alpha.pdf. And this is my problem - can I "force"
system (server, browser?) to keep showing http://......something.php ? The
true reason for this is, that in my PHP script I put the code that redirects
unlogged user to somewhere. But when you remember once only the address
http://......./alpha.pdf you will reach it any time without logging. Sorry,
I'm not sure if it's clear enough...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация