RE: [PHP] New as of today
| From: | Martin Towell | Date: | Fri, 30 Aug 2002 03:14:24 +0000 |
| Subject: | RE: [PHP] New as of today | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114586@lists.php.net to get a copy of this message | ||
if you have each filename on a new line, then use file() to grab the
contents. It returns an array, each line is an element in the array. You can
then do what you want with the array
HTH
Martin
-----Original Message-----
From: stu9820 [mailto:stu9820@westga.edu]
Sent: Friday, August 30, 2002 1:08 PM
To: php-general@lists.php.net
Subject: [PHP] New as of today
Im new to PHP (came from ASP). I'm trying to make pictures (.jpgs) come out
of a folder and display on a page. Here is my code so far:
<?php
$fileLoc = "Bid2002/pictures.txt";
$zFile = fopen($fileLoc, "r");
$zContents = fread($zFile, filesize($fileLoc));
fclose($zFile);
echo "<a href=test.php>$zContents<br></a>";
?>
I dont have database support on the server i use (school server). I have
all
the picture names in a text file and i want to pull out the name of pictures
from the text file and make it pull out of the picture folder. Is there an
easier way to do this? Or is this the best way. ASP is very because you
can
loop through the file and I thought I could do it with php but it ends up in
one big link. Thanks in advance.
Jeff
UWG Student
stu9820@westga.edu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php