ASP And TextFile

I would like to know how can I open a textfile from other website like www.website.com/jhon.txt.?

I want to open it in my default.asp, without remove my banners and buttons and all my Images, Im just want to open it in the middle of my asp page. How can I do that?

View Replies


ADVERTISEMENT

How To Append To A Textfile?

I cannot append to a textfile. This is my sample code:

set f=Server.CreateObject("Scripting.FileSystemObject")
set obj_log .CreateTextFile"C:loglog.txt",true)
obj_log.WriteLine("Added schedule by [Name]")
f.close
obj_log.close
Set obj_log=Nothing
Set f=Nothing

The problem is the next time i execute these lines from an asp page, it does not append in a new line. I cannot figure out how.It just keep on overwriting.

View Replies View Related

Asp Guestbook W/ Textfile

i need a asp script out there for a guestbook. all the form input will be stored to a normal txt file, not a database. anyone have any links out there for this ? i have found a couple, but got errors when setting them up and it's been the script, not the server.

View Replies View Related

TextFile Never Return

I cannot use the OpenTextFile method, it's never return and I get no
error message! Setting Response.Buffer=False, has no effect. No matter
if I use it ForReading or ForWriting, it never return. In the following
code, the problem occurs at line 3.

aFileName = Server.MapPath("WEB_PROD.htm")
set fs = server.CreateObject("Scripting.FileSystemObject")
set fso = fs.OpenTextFile(aFileName, ForReading, False)
s = ts.ReadAll
ts.Close
set ts = nothing
Response.Write s

View Replies View Related

Create Textfile Using Asp

i want to create atext file using asp(filesystemobject but my explorer hangs on. Why?

View Replies View Related

Editing A Textfile

I am currently writing a script for a course i am doing, It lists all the files and folders on the server, and works similar to windows explorer ( if you click on the folder it shows the content ). I have enabled it so you can delete, view source, and download all files/folders.

Now theres one more thing i would like to do, and that is to enable the user to edit a file, and i am struggling quite a bit, any guidance, ideas or links to a similar tutorial. I am probably going about it completley the wrong way, I was trying to open the file read each line and write it into a textarea, so the user could edit it, and then save it.

View Replies View Related

Cannot Append To Textfile

With the following code I can create a new textfile if it does not exist, but it seems impossible to me, to append data to an existing file.

Dim objOpenFile, objFSO, strPath
StrPath = Server.MapPath("../smslog.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

If objFSO.FileExists(StrPath) Then
Set objOpenFile = objFSO.OpenTextFile(StrPath, ForAppending)
Else
Set objOpenFile = objFSO.CreateTextFile(StrPath, True)
objOpenFile.WriteLine "KundNr;Namn;Datum;Tid" 'header
End if
..
..
what I have done wrong?

View Replies View Related

Textfile Search

I'm trying to make a text file search that will read a text file looking for the string the user typed in, then if it finds the string i want it to display all the information on that line then continue it's search through the rest of the file repeating the previous step if needed.

What i've got so far is it reading the text file in and it can search for a particular string(word, name etc) and say whether or not its in the file, but i don't know how to get it to display the whole line of information and continue it's search.

View Replies View Related

Write And Read From Textfile

Alright im tryin 2 write 2 a text file and then read from tat text file on the same page is this possible this is what i got so far. Code:

View Replies View Related

Keyword Search A Textfile

I read a text file in ASP using readline. The line is stored in a variable. I want to be able to search that line for a specific word.

How do I go about this?

View Replies View Related

ASP RecordSet Output To A .CSV Textfile

After I've performed a query and held the data in a RecordSet (rsQuery), can
I dump the recordset into a comma separated text file? How?

View Replies View Related

Read Last Line In Textfile

I wuz just wondering, whats the easiest way to read a text files last line...

I know i have to count the lines and put pointer to the last line and read from there.. but i cant get the hang of it

heres my code:

View Replies View Related

Show Textfile In Browser

I'm pretty new to webprogramming. I use VWD 2008 Express Edition.
I try to build a webpage and the content of that page is stored in a
textfile on the filesystem. That way I can change the content of my webpage
very easy. The problem is that I can't figure out how to show the content of
that textfile in my browser.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved