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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I disable user from making any changes on a text file?

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have a link on my page to a .txt file on the server. I want to make this file a read-only file and disable the user from making any changes to it and disable the dialog boxes from popping -up. Also, I want the user to be able to print this file but not the whole web page (the document only displays on one frame).

Any help will be greatly appreciated.
 
Make file read only from the server (you know, right-click, properties, check read-only.)
Wushutwist
 
OR,
set the attributes property of file to 1 (read-only)
<% set Fobj = Server.creatObject(&quot;Scripting.FileSystemObject&quot;)
set afile = FObj.GetFile(&quot;C:\test.txt&quot;)
afile.attributes = 1
%>

HTH
 
Don't show the file as a link? If you have some users that are supposed to be able to access the file, then show those users the link to the file by setting a cookie or session variable and by first making all users log into your site.. To print the page, the text open a new window and query only the text file.. on a white background..That should be acceptable most of the time..

Tim
 
Could any of you please explain to me how the user can change the file on the server when their only access to the file is HTTP since HTTP does not support that action?

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top