Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save variables to harddrive

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I must save some variables to the users harddrive using php,
i tried to write c:\var.txt as the text file name, but then a text file, called"c:\var.txt" was on my server,
so how can i manage to save a variable to the text file text.txt to the users harddrive folder c:\
 
Umm, other than using cookies, that is impossible, unless the user is running a web server and you have access to their machine via thier IP. That is highly unlikely.

Just use the PHP cookie functions to write the information to the harddrive. This will only work if the user allows cookies, obviously.


Then, just use the PHP cookie functions to parse the cookie and there you go. Thats the only way to do it, that I am aware of.

Hope this helps,

-Vic
vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Supposedly there are methods to do stuff like that in signed scripts with IE, where the user allows the server access to a certain amount of filehandle information. This is not a PHP function, but more a question of client-side JScript, or ActiveX. This only works with Internet Explorer, and is only wise in a carefully controlled intranet environment. Check out for more information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top