note 55403 added to class.dir

From: Date: Tue, 02 Aug 2005 14:53:25 +0000
Subject: note 55403 added to class.dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-92954@lists.php.net to get a copy of this message
Hello Im having trouble with my php, its supose to read the directory and make an array with it. Here is the code: $mydir = new dir('/home/backendc/public_html/alex/'); echo "mydir= ". $mydir; while(($file = $mydir->read()) !== false) { echo "Filename: $file<BR>"; } i tried also this: $mydir = new dir('/alex/'); But it seems to have a php trouble in the server i rented The error is this: Fatal error: Cannot instantiate non-existent class: dir in /home/backendc/public_html/dirs.php on line 10 I think maybe the php version in the server its an old one, can some one help me?. I need to read the content of the directory dynamicaly. THANKS ---- Manual Page -- http://www.php.net/manual/en/class.dir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55403 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55403&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55403&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55403&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55403&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55403&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55403&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55403&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92954) next »