Another solutions is:
$script_name = getenv("PATH_TRANSLATED");
$dir_name = dirname($script_name);
// $arFiles will be an array of filenames
exec( "ls -1 $dirname", $arFiles )
foreach( $arFiles as $cFile ) {
print( $cFile );
}
Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=
-Original Message-
From: Ifrim Sorin [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 17, 2001 5:46 AM
To: Brandon Orther; PHP User Group
Subject: Re: [PHP] Dir? Can I get a dir listing of the current dir my
php file is in?
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 [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]