Get user home directory ??

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
wpsd2006
Forum Commoner
Posts: 66
Joined: Wed Jan 07, 2009 12:43 am

Get user home directory ??

Post by wpsd2006 »

Hm i can't find this in php document....

my work place using both ubuntu and windows for OS
i have an intranet application that most of the time need to create a document ( .doc ) from database list

i understand how to create the doc file
but i don't know how to save it to their computer ( not to the server )
for easy access I'm going to save it to the user computer Desktop

How do i get their computer Desktop folder automatically ( in ubuntu and windows and different user ) is it possible ?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Get user home directory ??

Post by pickle »

You can't force a download to a particular spot on a user's computer. That would be a tremendous security hole. The best you can do is offer the file to download, and hope the user saves it on the desktop. Though, if the user is saving it, there should be no reason they shouldn't be able to save it wherever they want.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply