08-27-2007, 06:21 AM
how can i open (download) .txt file , i.e located in my local system by using php coding.when i click some link,it automatically open the .txt file(located on C:/folder/test.txt). please anybody help me.how can i do that.
Well if you didn't want to save the changes to the file, which i'm guessing you are, you could provide a link that will open the text file in the browser.
But if you want to edit it you would need to open the file, read each line and save it to a variable. Then put that variable in a <textarea> tag with a submit button that saves the changes to the txt file.
go here to learn how to do it http://php.net/manual/en/function.fopen.php