![Anybus CompactCom 40 EtherNet/IP Network Manual Download Page 41](http://html1.mh-extra.com/html/anybus/compactcom-40-ethernet-ip/compactcom-40-ethernet-ip_network-manual_2948758041.webp)
Server Side Include (SSI)
41
Doc.Id. HMSI-27-212
Anybus CompactCom 40 EtherNet/IP
Doc.Rev. 1.5
6.3.8 SaveDataToFile()
This command stores data from an HTML-form as a file in the file system. Content from the different
form objects are separated by a blank line (2*CRLF).
Note:
This command cannot be used in email messages.
Syntax:
<?--#exec cmd_argument='SaveDataToFile("
filename
" [, "
source
"],
Overwrite
|
Append
)'-->
filename
-Destination file. If the specified file does not exist, it will be created
(provided that the path is valid).
source
- Optional; by specifying a form object, only data from that particular form
object will be stored. Default behaviour is to store data from all form
objects except the ones where the name starts with underscore (‘_’).
Overwrite|Append -Specifies whether to overwrite or append data to existing files.
Default Output:
Example:
The following example demonstrates how to use this function. The resulting page sends a form
to itself, which is then evaluated by the SaveDataToFile command.
<HTML>
<HEAD><TITLE>SaveDataToFile Test</TITLE></HEAD>
<BODY>
<?--#exec cmd_argument='SaveDataToFile("\stuff.txt", “Meat”, Overwrite)'-->
<FORM action="test.shtm">
<P>
<LABEL for="Fruit">Fruit: </LABEL><BR>
<INPUT type="text" name="Fruit"><BR><BR>
<LABEL for="Meat">Meat: </LABEL><BR>
<INPUT type="text" name="Meat"><BR><BR>
<LABEL for="Bread">Bread: </LABEL><BR>
<INPUT type="text" name="Bread"><BR><BR>
<INPUT type="submit" name="_submit">
</P>
</FORM>
</BODY>
</HTML>
The resulting file (‘\stuff.txt’) will contain the value specified for the form object called ‘Meat’.
Note:
In order for this example to work, the HTML-file must be named ‘test.shtm’.
Scenario
Default Output
Success
“Configuration stored to “
filename
” ”
Authentication Error
“Authentication error ”
File write error
“Could not store configuration to
“filename”
“