Re: Dir? Can I get a dir listing of the current dir my php file is in?

From: Date: Sat, 17 Feb 2001 12:46:02 +0000
Subject: Re: Dir? Can I get a dir listing of the current dir my php file is in?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40323@lists.php.net to get a copy of this message
Hi, You could try this: $script_name = getenv("PATH_TRANSLATED"); $dir_name = dirname($script_name); $d = dir($dir_name); $i = 0; while ($file = $d->read()) $file_array[i] = $file ; } HTH Sorin Ifrim ----- Original Message ----- From: Brandon Orther <brandon@webintellects.com> To: PHP User Group <php-general@lists.php.net> Sent: Saturday, February 17, 2001 5:03 AM Subject: [PHP] Dir? Can I get a dir listing of the current dir my php file is in? > Hello, > > I am looking for a way to get a dir listing of the current dir my phpscript > is in and putting it into an array. Does anyone have a quick way to do > this? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon@webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#40323) next »