Page 1 of 1

php code to copy a file from C:\DOCUME~1\LOCALS~1\Temp

Posted: Tue Jul 03, 2007 7:04 am
by patelhiteshp
I want to Copy a file from

C:\DOCUME~1\LOCALS~1\Temp folder of client machine to a SErver.

I dont know the function which will go to C:\DOCUME~1\LOCALS~1\Temp and pick the file.

HOw can I get to this location, because it varies from client to client machine.

Can some one help me

Posted: Tue Jul 03, 2007 7:07 am
by volka
php -executed at the webserver- has access to the server's local filesystem but not the client's local filesystem.
What are you trying to achieve?

C:\DOCUME~1\LOCALS~1\Temp folder of client machine to a SErv

Posted: Tue Jul 03, 2007 7:26 am
by patelhiteshp
I want to uplaod a file from my LOCAL machine to Server.

I know that can be done.

Now the File location is Dinemic, because its in a Temp folder of any client who is trying to upload the file.
So I just wanted to know the exact location of any clinet's Temp folder thru PHP code or function..


How can I do that?

Posted: Tue Jul 03, 2007 7:27 am
by feyd
You can't.

I got it

Posted: Tue Jul 03, 2007 8:08 am
by patelhiteshp
Hey I got it
What should I do to achieve this?

Re: I got it

Posted: Tue Jul 03, 2007 8:10 am
by JayBird
patelhiteshp wrote:Hey I got it
What should I do to achieve this?
Nothing, it isn't possible, unless you provide a form with a file field and let the user choose the file they want to upload

u r right

Posted: Tue Jul 03, 2007 8:13 am
by patelhiteshp
I got you Point Spidy.

Now tell me how can I achieve this?

Posted: Tue Jul 03, 2007 8:17 am
by feyd
No, you don't get it. You, without a doubt, 100% cannot do it.

The best you can provide is a file-upload field. You cannot prefill the field; you cannot restrict where it will load data from; you have no control over it whatsoever.

File Uploading Problem

Posted: Sat Jul 07, 2007 6:12 am
by patelhiteshp
Ok. here [s]m[/s] I'm giving you the full detail of the work what [s]m[/s] I'm trying to get it done..
I am opening a file from server [s]thru[/s] through a Web browser.
that mean I make users to see the file in web browser.
Mind you file will be seen in web browser but it will get open using appropriate application.
Like... if user want to see DOC file user will be accessing a file in browser but it will be open in MS Word withing that browser. Because I want that user to make change in that file.


And when he finish making changes in that file should be uploaded again in the server with those changes..
DONT WANT to MAKE USER TO DOWNLOAD AND UPLOAD that file again....


NOw can anyone suggest me how can I achieve this?
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Sat Jul 07, 2007 6:17 am
by volka
You might be interested in WebDAV
see http://www.webdav.org/other/faq.html