Re: Problem w/ reading a txt file.
| From: | sub at pudlz dot com | Date: | Tue, 13 Sep 2005 15:02:34 +0000 |
| Subject: | Re: Problem w/ reading a txt file. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-222266@lists.php.net to get a copy of this message | ||
Yeah, I just cut out almost the code that was working fine. My the full code
does a bit more than than that.
Thanks all,
Andrew Darrow
Kronos1 Productions
www.pudlz.com
----- Original Message -----
From: "Burhan Khalid" <phplist@meidomus.com>
To: <sub@pudlz.com>
Cc: <php-general@lists.php.net>
Sent: Tuesday, September 13, 2005 12:45 AM
Subject: Re: [PHP] Problem w/ reading a txt file.
> sub@pudlz.com wrote:
> > Problem w/ reading a txt file.
> >
> > The error I get is "Warning: opendir(/home/pudlz/public_html ): failed
to
> > open dir: No such file or directory "
> >
> > Here's my code::
> >
> > $main = file('folders.txt');
> > $counter = count($main);
> >
> > for($i=0;$i<$counter;$i++)
> > {
> > if ($handle = opendir("$main[$i]"))
> > {
> > $b=0;
> > }
> > }
> >
> >
> > It's reading and extra space at the end of all my lines. How do I
prevent
> > that?
>
> $main = file('folders.txt');
> foreach($main as $folder)
> {
> if ($handle = opendir(trim($folder))
> {
> $b = 0;
> }
> }
>
> I really don't see the point in this loop, but maybe you gave a very
> simple example.
>
> Warmly,
> Burhan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.23/99 - Release Date: 9/12/2005
>
>