Php save

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___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Php save

Post by user___ »

Hi guys,
I am creating a portal which is used by users to upload and download different files. I want when a user upload for example .php file and another user tries to download it a download message to be displayed as if they were downloading an .exe file. I know that this can be accomplished while the upload is being done but I need it to start when a download has been initiated. I would appreciate any kind of help witha nother problemn. I want to enable users to download a page they are browsing without file->save/save as procedure. I have tried a JavaScript but it works only with IE.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Search for force download. We've talked about it a whole lot.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

Thank you, feyd. I found enough information about how to force a download but I did not find anything about saving page while browsing.
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 do both at once without control over where php is saving the files. Provide a link or something that requests the page again, but triggered to force the download.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

I do not mean saving simulaniously. I will try to explain clearer. A user clicks on a button and then a window pops up and ask them to save the page but I do not mean only the source but all, images, flashes, and csses. The same as if you want to save a page from File->Save/Save As.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

PHP cannot make the browser save all the files. PHP can zip the files, but there's no way to control the browser's own saving mechanisms.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

I though it was the case but now I am sure.
Post Reply