NYCPHP Meetup

NYPHP.org

[nycphp-talk] alternate to scandir()

selyah selyah1 at yahoo.com
Sun Jul 29 16:56:10 EDT 2007


the glob($files.'/*')  seems to work ...thanks you

Dell Sala <dell at sala.ca> wrote: On Jul 29, 2007, at 2:35 PM, selyah wrote:

> $dir=$_SERVER['DOCUMENT_ROOT']."coles/admin/new_images/".$_FILES 
> ['image']['name'];
> $files=scandir($dir);
>
> is there an alternate syntax to writing this function call in  
> version 4.3.10? and wher can i find a link to a manual for this  
> version?

Try using glob() instead. You'll probably use it something like this:

$fileList = glob($dir.'/*');

http://us3.php.net/manual/en/function.glob.php

BTW: something looks funny with your line that computes "$dir". Is  
$dir supposed to be a file or a directory?

-- Dell


_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070729/9d115c1d/attachment.html>


More information about the talk mailing list