Menu
I’m attempting to read a text file using javascript. here’s the code i have thus far.
[COLOR=”Red”]fh = fopen(getScriptPath(‘Scripts/Test.txt’), 0); // Open the file for reading
length = flength(fh); // Get the length of the file
str = fread(fh, length); // Read in the entire file
fclose(fh); // Close the file
// Display the contents of the file
write(str);
nothing is displaying, the file path works as i have displayed .gif files using the same path. thanks for the help.
Dan