Technical References - [appendfile]

Writes text to the end of an existing file.

numero = 254
interpreted = N
texte = [appendfile FileName]Text[/appendfile] To add text to the end of an arbitrary text file, put an [appendfile] context into a template. AppendFile creates a new file if one does not exist already. All text is put at the end of the file, after any text that may already be there. The file must not be a database file that WebDNA currently has open. See [writefile].

AppendFile does not 'understand' databases. If you want to append a new record to the end of a database, use [append] instead.

Example:
[appendfile SomeTextFile]Hello, my name is Grant. The time is [time]This is a second line[/appendfile]
The text file "SomeTextFile" opens, and the text Hello, my name is Grant. The time is 13:43:01 This is a second line is written at the end of the file. Notice that carriage returns inside the context are written to the file exactly as they appear. Also notice that any WebDNA [xxx] tags inside the context are substituted for their real values before being written to the file. You may specify a full or partial path to the file, as in "/Some Folder/file.txt" (starting from the web server's root) or "LocalFolder/file.txt" (starting in the same folder as the template file, looking down into a folder called "LocalFolder").

If you want the tags inside the context to be interpreted, you will have to add <!-- HAS_WEBDNA_TAGS --> and make use of the [raw] context.

[appendfile FileName]Text[/appendfile]

To add text to the end of an arbitrary text file, put an [appendfile] context into a template. AppendFile creates a new file if one does not exist already. All text is put at the end of the file, after any text that may already be there. The file must not be a database file that WebDNA currently has open. See [writefile].

AppendFile does not 'understand' databases. If you want to append a new record to the end of a database, use [append] instead.


Example:
[appendfile SomeTextFile]Hello, my name is Grant. The time is [time]
This is a second line[/appendfile]

The text file "SomeTextFile" opens, and the text

Hello, my name is Grant. The time is 13:43:01
This is a second line


is written at the end of the file. Notice that carriage returns inside the context are written to the file exactly as they appear. Also notice that any WebDNA [xxx] tags inside the context are substituted for their real values before being written to the file. You may specify a full or partial path to the file, as in "/Some Folder/file.txt" (starting from the web server's root) or "LocalFolder/file.txt" (starting in the same folder as the template file, looking down into a folder called "LocalFolder").

If you want the tags inside the context to be interpreted, you will have to add <!-- HAS_WEBDNA_TAGS --> and make use of the [raw] context.



DOWNLOAD WEBDNA NOW!

Top Articles:

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

WebDNA Libraries

A list of available libraries for WebDNA...

F.A.Q

A compilation of some user's questions...

Tips and Tricks

A list of user-submitted tips ...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

[hide]

Prevents WebDNA to return hidden parts of your code to apache (from version 8...

[formvariables]

Lists all the form variables and parameters passed to the current page...

[cookie]

Cookies are a great way to remember visitors...

[movefile]

This instructions move a file from one location to another...

[delete]

[delete db=some...

[encrypt]

[encrypt] and [decrypt] allow you to store sensitive data in your databases without risk of exposing it to prying eyes...