edit: PHP question..

b4u

Golden Member
Nov 8, 2002
1,380
2
81
Well, I don't believe it's possible ... IFAIK standards compliance do not allow any access to client resources. So as html/javascript comply to those basic rules, you do not have a way of doing it in javascript. (I saw those rules somewhere, don't exactly know where ... maybe here, but I'm not sure).

You could do it using ActiveX, and as long as the user accepts the ActiveX to run on your computer, you can access client resources using vb intruction set. User would see a pop-up window asking for authorization, but then again, he may reject it (like I mostly do), or he can even have a security level that disables any ActiveX execution.

<edit>
Could you imagine if we could access client resources via javascript? For example one would access a page, and it would delete contents of system directory ... or it would redirect &amp; upload some personal file stores on My Documents ... eheh that would be the end of web as we know it ...
</edit>
 

Modeps

Lifer
Oct 24, 2000
17,254
44
91
you cant do it with javascript. it doesnt have that kind of access to files and runs client side, not server side... if it did, chances are there would be about 4000 more bugs microsoft had to fix with their browser to prevent "malicious code from running on the user's computer" It's pretty easy to do with PHP however, of course that's server side file listing, not client side.
 

mugs

Lifer
Apr 29, 2003
48,920
46
91
Maybe you should clarify whether you're talking about a directory on the client machine or the server.
 

cHeeZeFacTory

Golden Member
Apr 23, 2001
1,658
0
0
sorry folks..i do mean server, but after a quick look into the php manual, i know understand how to do it. Thanks!!