Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania bez odpowiedzi
Viewing all articles
Browse latest Browse all 22036

fopen nie wczytuje pliku

$
0
0

Witam,

próbuję otworzyć plik tekstowy w JS, ale ciągle dostaję błąd:

ReferenceError: fopen is not defined

fh = fopen('info.txt', 0); // Open the file for reading.
if(fh!=-1){ // Check if the file has been successfully opened.
	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.
    alert(str);
}

 


Viewing all articles
Browse latest Browse all 22036

Trending Articles