Re: How to get a network drive name

From: Date: Thu, 02 Feb 2006 14:16:11 +0000
Subject: Re: How to get a network drive name
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-229719@lists.php.net to get a copy of this message
Ibrahima TALL wrote:
----- Original Message ----- From: "Jim Moseby" <JMoseby@nrbindustries.com> To: <php-general@lists.php.net> Sent: Thursday, February 02, 2006 2:34 PM Subject: RE: [PHP] How to get a network drive name
Hi everybody ! I would need a help in php or a portable javascript solution (for several browsers). My problem is : i have no solution about how to get a network drive name. For exemple, getting COMMON in COMMON(X:). The only solution i saw was using activeX controls with javascript but the problem is that this controls are only compatible with IE. I'm working with php under XP. Sorry for my bad english, i hope i was clear however, any suggests are welcome, thanks !
In the context of a webserver/browser scenario, PHP will only be able to tell you about the webserver, as it is a server-side technology.
Yes i have a php application, so a server-side application. In the machine where the server is installed i have mapped COMMON1(X:), COMMON2(Y:) and COMMON3(Z:) network drives and now what i need is to get COMMON1, COMMON2, COMMON3 informations in stead of X:, Y:, Z:. I have no problem for getting X:, Y:, Z: (if(is_dir("X:") works very well for that)) Nothing
about PHP 'runs' in the browser. In other words, you can probably get all the information you want about the SERVER's network drive names, and display that on the user's browser,
Ok, so in php, how can i get the netowok drive names i mapped on the server and to display them in the client's browsers ? Told ya.
Over the shell. You can output the "shell output" into a variable. e.g. //code echo shell_exec ("vol c:"); This shows the Name of the volume C: on windoze systems. you can also do $var = shell_exec ("vol c:"); and then ereg the name out of it Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

« previous php.general (#229719) next »