RE: [PHP] ? about PHP includes
| From: | Craig Westerman | Date: | Fri, 03 Aug 2001 03:59:50 +0000 |
| Subject: | RE: [PHP] ? about PHP includes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61040@lists.php.net to get a copy of this message | ||
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 notepad.
------------------------------------------------------------
<html>
<head>
<title>Include Abbreviated File</title>
</head>
<body>
<pre>
<?php
$txtfile = fopen("text.txt", "r");
while (!feof($filePointer))
{
$line = fgets($txtfile, 250);
print $line;
}
close($txtfile);
?>
</pre>
</body>
</html>
------------------------------------------------------------
Thanks
Craig ><>
westerman@chanuteks.com