# Loading Text Files

**URL:** <https://forum.kirupa.com/t/loading-text-files/99780>\
**Category:** Uncategorized\
**Created:** [January 22, 2004, 1:18am UTC](https://forum.kirupa.com/t/loading-text-files/99780 "2004-01-22T01:18:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![InsaneMonk](https://avatars.discourse-cdn.com/v4/letter/i/ce7236/32.png) [@InsaneMonk](https://forum.kirupa.com/u/InsaneMonk)\
**Post date:** [January 22, 2004, 1:18am UTC](https://forum.kirupa.com/t/loading-text-files/99780/1 "2004-01-22T01:18:41Z")

</div>

I need sooooo much help loading text files (.txt). Here is what the text files says:

```php
myVar=Succesful

```

and my script (in the frame)

[AS]var data = new LoadVars();  
data.load(“loadtest.txt”);  
data.onLoad = function(loaded) {  
if (loaded) {  
\_root.dynamicText = this.myVar;  
} else {  
\_root.dynamicText = “Error loading data”;  
}  
}[/AS]  
It dusnt wrk. Do I have to host the file as .php. Do I even have to host it? or can I load it from a direct file (from my PC)
