$read file

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 11: Line 11:
  
 
Running the script fills the specified script with the contents of the file specified with the read file function.
 
Running the script fills the specified script with the contents of the file specified with the read file function.
 +
 +
[[File:readfile1.png]]
 +
 +
Replacing the file path with a url for a file returns the contents of the file at the url.
 +
 +
<pre>
 +
type text(<about me textarea>, $read file("http://wordpress.org/extend/plugins/about/readme.txt"), "Standard")
 +
</pre>
  
 
[[File:readfile1.png]]
 
[[File:readfile1.png]]

Revision as of 16:39, 15 October 2012

$read file is a Variable 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")

File:Readfile.png

Running the script fills the specified script with the contents of the file specified with the read file function.

File:Readfile1.png

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")

File:Readfile1.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox