We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,390 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Counting no of files in a directory in another machine

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.
2
Contributors
2
Replies
5 Hours
Discussion Span
11 Months Ago
Last Updated
3
Views
divyakrishnan
Posting Whiz in Training
235 posts since May 2010
Reputation Points: 30
Solved Threads: 24
Skill Endorsements: 1

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

Echo89
Junior Poster
109 posts since Mar 2012
Reputation Points: 9
Solved Threads: 4
Skill Endorsements: 0

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

The "img" folder in 192.168.0.138 is shared.

divyakrishnan
Posting Whiz in Training
235 posts since May 2010
Reputation Points: 30
Solved Threads: 24
Skill Endorsements: 1

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0605 seconds using 2.66MB