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 01-23-2012, 04:08 PM   PM User | #1
kyle0032
New to the CF scene

 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kyle0032 is an unknown quantity at this point
ScanDir Directory on Users PC

Hey Guys/Gals,

I am working on an web application, I need my application to scan a directory on the users pc and list the contents... I.E C:\ADP\ ..
is there anyway to reference this using scandir() or a similar function.. can I put file:// in front or ?


Let me know if this is possible at all. The application is going to import files from a local directory on the users pc into the web database.

Thanks,
Kyle
kyle0032 is offline   Reply With Quote
Old 01-23-2012, 04:51 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Sure isn't. This would be a blatant security hole. PHP is a server side language, not a client language, so in order to navigate a client file system you will need to use a client language to do so.
C# and Java can do this, and can be written to connect to php based website. Or the standard html input type file will work fine for finding a file the client wants to upload.
Fou-Lu is offline   Reply With Quote
Old 01-23-2012, 05:05 PM   PM User | #3
kyle0032
New to the CF scene

 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kyle0032 is an unknown quantity at this point
Thanks For the Reply..

Here is what I want to accomplish:

I am designing a Web Based App. There is a client side program that creates Export database files. I need to get the data out of these files and into my database (importing basically).

What do you think is the best way to do this?

I don't want the user to have to do anything except for push a button that imports any new files in the directory.

The files are small (1k - 6k)...Transmitting them to my webserver to work with them there is a viable option. Is there any way I can make a web page that will scan the local directory and upload all the files it finds to the web server so I can work with them there?

What language should I do this in? Do I need to build a client-side app that will upload the files instead?

THanks For any advice.

Kyle
kyle0032 is offline   Reply With Quote
Old 01-23-2012, 05:10 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
You will yes.
Use C# for this. You can write as a service if you want, and knowing a location to where a file is stored is all that is required. Connecting to a remote location and using a put or soap or something would be fairly trivial to do.
Fou-Lu 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 07:27 PM.


Advertisement
Log in to turn off these ads.