Reply to Re: Populate picklist from directory and return file name

Your name:

Reply:


Posted by Sandman on 09/13/05 19:45

In article <1126621984.221410.309530@g44g2000cwa.googlegroups.com>,
"sunbum" <mbrashars@gmail.com> wrote:

> Here is what I have now ... (without the line numbers)
>
> 1)<?
> 2) # Directory
> 3) $dir = "\inetpub\wwwroot\templogs\";
> 4)
> 5) print "<select name='file'>";
> 6) $dir = opendir($dir);
> 7) while (false !== ($file = readdir($dir))){
> 8) if (in_array($file, array(".", ".."))) continue;
> 9) print "<option value='$file'>$file</option>";
> 10) }
> 11) print "</select>";
> 12)
> 13)
> 14)?>
>
> Still gives "Parse error: parse error, unexpected T_STRING in (script)
> on line 5

Strange. It works like a charm for me. Maybe you got some strange invisible
character caught on that line?

--
Sandman[.net]

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация