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

Posted by salonowiec on 10/19/07 21:11

After hard work and many attempts I found this:

<?php
/* logging test coming at this line */
header("Content-Type: application/pdf");
$fname='not1.pdf';
readfile($fname);
?>

This is quite enough for me, the address keeps being ........./*.php so for
unlogged user the site will not be accessible.
Many thanks...


Uzytkownik "Jerry Stuckle" <jstucklex@attglobal.net> napisal w wiadomosci
news:NdudnTsk4tCnNIXanZ2dnUVZ_r7inZ2d@comcast.com...
> salonowiec wrote:
>>
>> Uzytkownik "Jerry Stuckle" <jstucklex@attglobal.net> napisal w wiadomosci
>> news:Zb-dnQ0AD6ulPoXanZ2dnUVZ_vShnZ2d@comcast.com...
>>> If you want to protect them from being downloaded, you need to either
>>> use HTTP authentication
>>
>> ...this I'd like to avoid...
>>
>>> or deliver the files in your script (with the appropriate headers).
>>>
>> Could you, please, give a sample of such a hader?
>>
>
> RTFM.
>
> http://us2.php.net/manual/en/function.header.php
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
>

 

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

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