NYCPHP Meetup

NYPHP.org

[nycphp-talk] alternate to scandir()

Ben Sgro (ProjectSkyLine) ben at projectskyline.com
Sun Jul 29 14:39:04 EDT 2007


Hello, 

According to php.net:
http://us2.php.net/manual/en/function.scandir.php
scandir
(PHP 5)
Is only available in php5.

- Ben


Ben Sgro, Chief Engineer
ProjectSkyLine - Defining New Horizons

Our company: www.projectskyline.com
Our products: www.project-contact.com

This e-mail is confidential information intended only for the use of the individual to whom it is addressed.
  ----- Original Message ----- 
  From: selyah 
  To: talk at lists.nyphp.org 
  Sent: Sunday, July 29, 2007 2:35 PM
  Subject: [nycphp-talk] alternate to scandir()


  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



------------------------------------------------------------------------------


  _______________________________________________
  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/b3c515ab/attachment.html>


More information about the talk mailing list