469,282 Members | 2,000 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Reading directory of hard drive

Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk
Jul 17 '05 #1
10 6732
Le 02/01/2004, 3A Web Hosting a écrit dans le message
<3F***************@3awebhosting.co.uk> :
Hi Folks

This is probably starring me in the face but how do I read the
contents of a hard drive directory? I've been playing around with
the opendir($dir) sample from php.net and can read from the
server without problem but how can I read a list of files from
the hard drive of the PC (win98 (spit!)) I'm using? Basically
what I want to do is read the file names of a certain directory
on the hard drive into an array and then upload them all onto the
server.


Hmm... you want to read the hard disk of the computer
accessing the webpage ?

--
SeeSchloß

Jul 17 '05 #2
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the admin
panel of a photo gallery I'm trying to write. All the photos go into a
directory on your hard drive, you log into the control panel, tell it
what directory to look in, it puts all the .jpg files into arrays and
uploads them.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk
Jul 17 '05 #3
Dans le message <3F**************@3awebhosting.co.uk>,
3A Web Hosting a écrit :
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the
admin panel of a photo gallery I'm trying to write. All the
photos go into a directory on your hard drive, you log into the
control panel, tell it what directory to look in, it puts all the
.jpg files into arrays and uploads them.


OK I read it but I thought I was not sure I had understood
correctly. To my knowledge, unless you set up an ftp server
or something like that on your computer, it won't be
possible I think. Not just with PHP at least.

--
SeeSchloß

Jul 17 '05 #4
It's not doable.

Uzytkownik "3A Web Hosting" <in**@3awebhosting.co.uk> napisal w wiadomosci
news:3F***************@3awebhosting.co.uk...
Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk

Jul 17 '05 #5
On 2004-01-02, 3A Web Hosting <in**@3awebhosting.co.uk> wrote:
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the admin
panel of a photo gallery I'm trying to write. All the photos go into a
directory on your hard drive, you log into the control panel, tell it
what directory to look in, it puts all the .jpg files into arrays and
uploads them.

If you had read the manual, you would have known that PHP is
server-side, and not client-side! Perhaps there is a nice JavaScript out
there that will do what you want (Actually i hope there is no such
thing, because that would allow evil admins to scan my harddisk
contents)

--
verum ipsum factum
Jul 17 '05 #6
Tim Van Wassenhove wrote:
If you had read the manual, you would have known that PHP is
server-side, and not client-side! Perhaps there is a nice JavaScript out
there that will do what you want (Actually i hope there is no such
thing, because that would allow evil admins to scan my harddisk
contents)


Now that is a scary thought!

--
www.eSnider.net
Jul 17 '05 #7
Hi Folks

Well, now that's it's morning and the effects of the cider have worn off
it's pretty obvious that PHP is server side and can't read the clients
hard drive.

I really should stop working earlier in the night!

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk
Jul 17 '05 #8
Regarding this well-known quote, often attributed to 3A Web Hosting's
famous "Thu, 01 Jan 2004 23:56:29 +0000" speech:
Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.


You'd probably need some sort of signed-Java applet to do that.

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #9
"3A Web Hosting" <in**@3awebhosting.co.uk> wrote in message
news:3F***************@3awebhosting.co.uk...
Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk


You lost me, I stared at your question for a bit,

are you trying to look at a client side directory, so a client can
upload pics via a web interface?

if this is the case, write an applet, or an activex web componet

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #10
"3A Web Hosting" <in**@3awebhosting.co.uk> wrote in message
news:3F**************@3awebhosting.co.uk...
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the admin
panel of a photo gallery I'm trying to write. All the photos go into a
directory on your hard drive, you log into the control panel, tell it
what directory to look in, it puts all the .jpg files into arrays and
uploads them.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk


try this:

http://www.gzentools.com/test/mfupload.html
it requires that you enable unsigned activex objects,
(I am not going to spend the money to sign a test)

I think something along those lines are what you are looking for.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Hal Vaughan | last post: by
18 posts views Thread by shakeel-ur-rehman | last post: by
5 posts views Thread by Michael C | last post: by
4 posts views Thread by William Sullivan | last post: by
5 posts views Thread by mick.smith1 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.