Re: [PHP] ? about PHP includes

2001-08-04 Thread David Robley
On Fri, 3 Aug 2001 10:16, Craig Westerman wrote: > Hello all, > > I just discovered PHP this week. I'm reading about include statements. > If I have a text file 2000 characters in length that I want to include, > I would do this to include to whole file: > > include ("file.txt"); > ?> > > What w

RE: [PHP] ? about PHP includes

2001-08-03 Thread Craig Westerman
OPen the file and read in the required number of characters (short explanation). Have a look at the file handling functions. -- David Robley Thanks David, I came up with this, but it doesn't work. Does text file need to be in a special format? It is 4 paragraphs of plain text created in notepa

Re: [PHP] ? about PHP includes

2001-08-03 Thread Christian Reiniger
On Friday 03 August 2001 05:59, Craig Westerman wrote: > $txtfile = fopen("text.txt", "r"); > > while (!feof($filePointer)) $txtfile instead of $filePointer > { > $line = fgets($txtfile, 250); fgets reads a line (i.e. up to a newline) with at most the specified numbers of characters. So