NYCPHP Meetup

NYPHP.org

[nycphp-talk] alternate to scandir()

selyah selyah1 at yahoo.com
Sun Jul 29 14:35:46 EDT 2007


I am currently using PHP version 4.3.10 and need a bit of help.  I created a script to display images in a directory.  part of the script is shown here :

$dir=$_SERVER['DOCUMENT_ROOT']."coles/admin/new_images/".$_FILES['image']['name'];
$files=scandir($dir);

this opens the directory and an returns an array of files and directories found within the folder.  The array is assigned to $files.

the problem is that when i execute the file, i am getting this  warning:

"Call to undefined function:  scandir()...."    and points to this line: $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?
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070729/30c2a9ea/attachment.html>


More information about the talk mailing list