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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
patelhiteshp
Forum Newbie
Posts: 9
Joined: Tue Jul 03, 2007 7:02 am

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

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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?
User avatar
patelhiteshp
Forum Newbie
Posts: 9
Joined: Tue Jul 03, 2007 7:02 am

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

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You can't.
User avatar
patelhiteshp
Forum Newbie
Posts: 9
Joined: Tue Jul 03, 2007 7:02 am

I got it

Post by patelhiteshp »

Hey I got it
What should I do to achieve this?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Re: I got it

Post 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
User avatar
patelhiteshp
Forum Newbie
Posts: 9
Joined: Tue Jul 03, 2007 7:02 am

u r right

Post by patelhiteshp »

I got you Point Spidy.

Now tell me how can I achieve this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
patelhiteshp
Forum Newbie
Posts: 9
Joined: Tue Jul 03, 2007 7:02 am

File Uploading Problem

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You might be interested in WebDAV
see http://www.webdav.org/other/faq.html
Post Reply