RE: [PHP] File lsiting exec(ls... using variables.

From: Date: Fri, 13 Jun 2003 19:46:35 +0000
Subject: RE: [PHP] File lsiting exec(ls... using variables.
Groups: php.general 
Request: Send a blank email to php-general+get-151416@lists.php.net to get a copy of this message
[snip] I'm trying to add a variable to the end of a directory listing. This will give me the root directory and show me all the files exec('ls /home/httpd/vhosts/sitename.com/httpdocs/resumes/', $filelist); [/snip] Have you thought about using http://us4.php.net/manual/en/function.opendir.php example; $cdrdirectory = opendir("/usr/local/crm/cdr/"); while($cdrtxt = readdir($cdrdirectory)){ if(($cdrtxt <> ".") && ($cdrtxt <> "..") && ($cdrtxt <> "cdrzip")){ ...do stuff... } } closedir($cdrdirectory);

« previous php.general (#151416) next »