Daniel Tryba a dit:
O.Gir <ol*****@nospam .posteasy.org> wrote:
can't manage to do it ..... was so easy under solaris ....
anybody knows how to get free disk space on remote disks ???
(with both local and remote *$#@%?&* machines running *$#@%?&* W$2000)
What is a remote disk (FS?, is it mounted?)?
BTW my guess is that you did it on Solaris using a "shell", if that's
the case you should take a look at microsofts scripting thingys
(http://msdn.microsoft.com/scripting (IIRC) and do a search for the
Scripting.FileS ysytemObject), IIRC it can do the equivalent of df.
Hi,
mmmmm .... year, of course, but the goal is to do it with PHP, and to do
it *quick* (ie: no recursive scanning)
Btw, you're (close to) right, while running solaris, I did a popen('df
<filesystem>',' r'), and then parsed the output of a fgets() ...
<filesystem> being a nfs mounted FS ressource identifier ... that worked
great ...
I guess that parsing the last line of the output of a simple "dir"
command should do the job, but even if I can type "dir \\server\share"
inside a console, and obtain the result I want, doing it by this way:
exec('dir \\server\share' ,$tbdir,$retdir );
or :
$fspace=shell_e xec('dir \\server\share' );
or even:
$fspace=system( 'dir \\server\share' );
(... yes, I escaped the string before sending it ...)
.... works on local filesystems, but not on remote ones ...
.... drives me crazy ...
I'll have a close look @ the scripting ref's you gave, but I'd really
like to solve this problem strictly with php ...
Thx anyway - O.Gir.