Hi..
How to count no of files in a directory which is in another machine?
I used the following code.But it is not working.

<?php
 $dir_path ="file://192.168.0.138/img/$sub_code/$sub_code".N."$churunano/*.*";
  $count = count(glob($dir_path));
     $files = glob($dir_path);
     ?>



 The above code returns the count as 0.

It won't work like that glob(); only works on the servers local filesystem, however.

Is their any way to count the files in network share?

The "img" folder in 192.168.0.138 is shared.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.