[PHP] Spaces

2002-12-07 Thread Patrick McKinley
Is there a way of getting a php to display all the spaces in a file.
i have used this to display an nfo file on my site:

---nfoload.php





nfo/$fol/ind.txt (tells the script 
filenames for the nfo files)



now since nfo files tend to include a fair bit of of ASCII art in them, i was 
wandering if there's a way to preserve the spaces in this file, so the ASCII art is 
preserved.

thanks





Re: [PHP] Spaces

2002-12-07 Thread Patrick McKinley
uhm, i feel silly now, ignore my question please
:D


- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "Patrick McKinley" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, December 07, 2002 8:08 PM
Subject: Re: [PHP] Spaces


> This isn't really a PHP question, but look at the  html tag.
>
> Patrick McKinley wrote:
>
> >Is there a way of getting a php to display all the spaces in a file.
> >i have used this to display an nfo file on my site:
> >
> >---nfoload.php
> > >$fol = $_GET['fol'];
> >$nfono = $_GET['nfono'];
> >require("nfo/".$fol."/ind.txt")
> >?>
> >
> >
> >
> > >$file = "nfo/".$fol."/".$nfo."";
> >$fp = fopen($file, "r");
> >$fc = fread($fp, filesize($file));
> >echo nl2br($fc);
> >fclose($fp);
> >?>
> >nfo/$fol/ind.txt (tells the
script filenames for the nfo files)
> > >if $nfono == "1" {
> >$nfo = "nfo_file_1.nfo
> >}
> >else if $nfono == "2" {
> >$nfo = "nfo_file_2.nfo
> >}
> >?>
> >
> >
> >now since nfo files tend to include a fair bit of of ASCII art in them, i
was wandering if there's a way to preserve the spaces in this file, so the
ASCII art is preserved.
> >
> >thanks
> >
> >
> >
> >
> >
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] force download with header()

2002-12-08 Thread Patrick McKinley
i was reading about php.net looking for a way to force a download of a txt file, 
rather than the browser displaying the file.
i ran into header() that seems to be able to accomplish it... but seeing as i'm very 
much a newbie at php, i can't seem to make this work
if the file i want to download is
nfo/60/ind.txt

how would i impliment this: