> If you're only executing one-liners and get all the > results back you're > better off using shell_exec(). popen() lets you open > a pipe to a > command--that way, you can funnel data to it as if > you were typing from the keyboard.
That's what I'll do then: use shell_exec(). > Permissions would be a problem with readdir() as > well. So this really shouldn't be a deciding factor then. Anyway, I've got it working out. I have it returning an array of filenames if successful. If it's a successful call, but no files exists (for instance *.html with no HTML files), then it returns 0. If it can't read the directory or the dir doesn't exist, it returns NULL. Just to make sure, I can do this: if($files = GetFileListing("htmls\*.html")) { . . . } and it will skip it if there either are no HTML files, oe htmls doesn't exist, right? If I get a 0 or a NULL return? (I figure, if I need to distinguish between these two, I can always do a $==0 or $==NULL comparison). __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php