NYCPHP Meetup

NYPHP.org

[nycphp-talk] alternate to scandir()

Ben Sgro (ProjectSkyLine) ben at projectskyline.com
Sun Jul 29 15:02:15 EDT 2007


"I am currently using PHP version 4.3.10 and need a bit of help".

Ah, upgrade to php5 and try again.

scandir( ) 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: NYPHP Talk 
  Sent: Sunday, July 29, 2007 2:57 PM
  Subject: Re: [nycphp-talk] alternate to scandir()


  hello:
  i looked at that link before and i think that i was entering it that way, yet i am still getting that warning.......should the function be declared somewhere before?

  "Ben Sgro (ProjectSkyLine)" <ben at projectskyline.com> wrote:
    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
    _______________________________________________
    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




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


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


More information about the talk mailing list