Results 1 to 2 of 2

Thread: opendir() Resource id #3 error

Hybrid View

  1. #1
    Join Date
    Feb 2014

    opendir() Resource id #3 error


    My code is

    $path = "../Data/01_OPL-277/02_SEISMIC DATA/01_2D SEISMIC/01_OLD 2D/01_2D NAVIGATION DATA/";
    $dir_handle = opendir($path) or die("Error");

    The result I get is "Error". I have other files with the opendir() function but they work. When I tried to echo the result of $path with the code:

    $path = "../Data/01_OPL-277/02_SEISMIC DATA/01_2D SEISMIC/01_OLD 2D/01_2D NAVIGATION DATA/";
    $dir_handle = opendir($path);
    echo $dir_handle;

    I get the result "Resource id #3".
    Does anyone know what that means?

  2. #2
    Join Date
    Jul 2013
    Voorheesville NY USA
    That function returns a resource. That is why you get the message you got. What did you expect?

    You can find out more about the opendir function in the php manual. THE place to go with these kinds of questions in the first place.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center