Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-14-2003, 01:25 AM   PM User | #1
djbruno
New Coder

 
Join Date: Feb 2003
Location: Brazil
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
djbruno is an unknown quantity at this point
Uploading dirs (multiple files) - browsin' the local filesystem

I made a script to update my site that actually deletes some files and rename some directories. As I couldn't get it to delete these files using the unlink function, I have gone with the ftp functions, and placed the script under a 'secure' directory (.htaccess) to prevent leaking my ftp login/passwd.

I would like to upload a dir that contains a lot of files (pictures) and another subdir that also contain a lot of files (thumbnails).

Is there anyway to use the script to browse my local disk, get the file names and put them using FTP?

No trouble using the ftp_ functions, just dont know how to (if possible) read the contents of some directory in my local hard disk.

Last edited by djbruno; 02-14-2003 at 01:32 AM..
djbruno is offline   Reply With Quote
Old 02-16-2003, 10:20 PM   PM User | #2
GoHF
New Coder

 
Join Date: Feb 2003
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
GoHF is an unknown quantity at this point
You are not the first one to come across this problem

I've been successful in reading a dir for all its files using ActiveX.

But then I came across another problem. You can't change the values of an <input type=file>. You can't:

a) <input type=file value=File>, it won't accept the value field

b) <body onload=getElementById('fileField').value='File'>
<input type=file id=fileField>
</body>, It will also do nothing.

File fields are not programable, mostly for security reasons, as you would be able to retrieve things from users computers without their permission.
GoHF is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26 PM.


Advertisement
Log in to turn off these ads.