<<

Contents

Search

>>

 

GET_FILE_FROM_CLIENT$

 

 

Function

 

 

Syntax:

GET_FILE_FROM_CLIENT$(<Filename>,<Maximum Number of Bytes>)

 

<Filename>

= <STRING-EXPRESSION>

<Maximum Number of Bytes>

= <NUM-EXPRESSION>

 

 

Meaning:

Reads a sequential file from the client computer and returns the content of the file as a string.

 

The single rows are separated by EBUS_LINEFEED$ in the returned string.

 

In Html programs the user has to select the file. If no file is selected GET_FILE_FROM_CLIENT$ returns the empty string "", otherwise EBUS_DATA$ contains the selected filename.

 

Example: The file daten.dat has to be fetched from the directory c:\temp on the client computer. This is done by the following function call in the macro:

 

DATA$ = GET_FILE_FROM_CLIENT("c:\temp\daten.dat",0)

 

In the browser the following dialog appears:

 

 

To upload the file the user has to click the button 'Browse' and has to select the specified file. By pressing the button 'Upload file' the file is uploaded.

 

Parameter:

Filename

Name of file. A path in the filename refers to the client computer.

Maximum Number of Bytes

Specifies the maximum of bytes to be read. If <Maximum Number Bytes> <= 0, the whole file is read.

 

Sample:

FILE_CONTENT$ = GET_FILE_FROM_CLIENT$("C:\test.dat",0)

 

See also:

COPY_FILE_FROM_CLIENT

COPY_FILE_TO_CLIENT

KILL_CLIENT

KILL_DIRECTORY_CLIENT