i don't know how to disable save after file have already download. Can everyone help me?
i use PHP to make attachment to excel file.
thx
i don't know how to disable save after file have already download. Can everyone help me?
i use PHP to make attachment to excel file.
thx
Wouldn't that defeat the object of making a file available for downloads?
i use header function :
-----------------
-----------------PHP Code:
$link=excel.xls;
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type:application/octet-stream");
header("Content-Length: " .(string)(filesize($link)) );
header('Content-Disposition: attachment; filename="'.basename($link).'"');
header("Content-Transfer-Encoding: binary");
readfile($link);
exit();
but it just download file. i want user download file but user can't save again the file. So, i must disable save button in excel.
May you help me?
Thank you very much
Last edited by Cutter; 08-31-2012 at 09:38 PM. Reason: Added code tags
I don't think you can, it would be pretty pointless anyway - couldn't they just copy and paste to another workbook?
the file of download can be copy and paste to another workbook.
But, it is still can be save. It's a problem. Because i want to make user can't save the file after they download the file. So, they only can read the file.
Do another solution to make user can read only after download? So, they can't save the file.
Thx
Don't let them download it? Just display the values on the page?
no,they can download and save in the harddisk. But, they can read only. They can't save the file. So, they can't edit the file.
So your actual question of I've understood correctly is how can you make an excel file read only in php?
Firstly, this is an excel forum, not a php forum so you're unlikely to get any help. However,list me see if I can give you a few pointers. You haven't said how you are creating the file, but I'm going to assume you're not just creating a csv file an renaming it. Sine you're creating an xls file rather than an xml based one you will be using some third party classes to achieve this functionality, the option to create the file as read only should be offered by them as a function.
I just don't really get the point though since they can just copy the contents to a new workbook and save over the top
yes.,oh. thank you very much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks