tags:

views:

109

answers:

1

Hi all,

I am working with PHP and would like to get a remote file path location so that I can read file contents.

I would like the user to direct to a particular file, which can be located anywhere in the computer, so that it can be processed by the script.

Thanks

A: 

You can offer a user the ability to locate a file on their local computer and submit it to you via a web form, like..

<form id="myForm" enctype="multipart/form-data" action="/formHandler.php" method="post" >
<label for="fileUpload">File to Upload:</label>
<input name="fileUpload" id="fileUpload" type="file" /><br />
<input name="submit" id="submit" type="submit" value="Upload Now"></form>

Then you can process it on your side with PHP, or whatever you have on the server end. Since PHP is one of your tags, you can learn more on how to access, and work with, on the server end from the PHP reference site:

http://www.php.net/manual/en/features.file-upload.post-method.php

I hope I understood your question correctly..

Tim
yes i guese thats the only way, my fear is when uploading a huge file.
jungle_programmer
If this is the answer to your question it is customary to go back and mark it as an accepted answer (to put the green check by it) when you get time.
Tim