$read file
From UBot Studio
(Difference between revisions)
Line 1: | Line 1: | ||
− | $read file is a [[ | + | $read file is a [[Data Functions|Data Function]]. |
The function returns the contents of a file. The read file function can also be used call a file from a URL location by placing the url within the function in place of a file path. | The function returns the contents of a file. The read file function can also be used call a file from a URL location by placing the url within the function in place of a file path. |
Revision as of 15:04, 11 April 2013
$read file is a Data Function.
The function returns the contents of a file. The read file function can also be used call a file from a URL location by placing the url within the function in place of a file path.
Example
type text(<about me textarea>, $read file("C:\\Users\\LillyT\\Desktop\\my file.txt"), "Standard")
Running the script fills the specified script with the contents of the file specified with the read file function.
Replacing the file path with a url for a file returns the contents of the file at the url.
type text(<about me textarea>, $read file("http://wordpress.org/extend/plugins/about/readme.txt"), "Standard")
Additional Information
To run the code for this example with a file on your system, simply change the file path and the url in the read file function. You can also use the browse button on the function to browse for the location of your file when reading content from a file on your system.