Jump to content

Counting files...


phpretard

Recommended Posts

I can't figure why this displays nothing but error.

 

I am trying to count the number of files in a specified folder.

 


$dirname = "ALBUMS/".$loc;

function num_files($dirname) 
{ 
    return count(glob($dirname)); 
} 
echo num_files();

 

Here is the error: Warning: Missing argument 1 for num_files(),

Link to comment
https://forums.phpfreaks.com/topic/101611-counting-files/
Share on other sites

Archived

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

×
×
  • Create New...

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.