Jump to content

Archived

This topic is now archived and is closed to further replies.

redneonrt

File Question

Recommended Posts

Is there a way to have php look in a directory and add all the file names it finds into an array?

Share this post


Link to post
Share on other sites
[code]
<?
$path = "path\to\folder";
$files = scandir($path);

print_r($files);
?>

[/code]

Places each file and directory name with the give path into an array.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.