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.
11 Months Ago
Last Updated
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
© 2013 DaniWeb® LLC
Page rendered in 0.0605 seconds
using 2.66MB