Read From A Tex File

  • Hi i want to read from a note.txt file, i don't understand how to even start doing that

  • Two possible ways

    -) ajax - read it with php

    -) custom plugins: file reader, csv, Json, call js

    Depends on where is the file, on the server or at the user..

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Currently the file is local but eventually i want the file to be server based. How do i got about with ajax?

    but also could you point me to one of these plugins too?

  • What do you want to do with that file? Only reading its content or modify it?

    If you want to read its content then the easiest way is using a custom plugin like load Json or csv.. in the plugin thread are examples how to do that.. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • you don't need php to read a textfile with ajax.

  • yeah thank you very much i will look at the plugins, and if you do know of a tutorial using ajax, i know i don't need it for what i want to do now but I do have some ideas that would be possible with the php work

    and thanks for the help big love

  • Hi me again :),

                   So i've been playing with AJAX, can it not return a value in preview mode? i'm accessing a .php file on a free hosting website "http://www.dailycrossword.site40.net/Sun.php" and when i use set text to ajax.lastdata it returns nothing is that because i'm trying it in preview mode?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry think i answered my own question i hosted the game on and it returned a string but only the 'Title' the first word in the string is this because i've not formated the .php file incorrectly? When i added more to the first line it returned that so how do i read the next line?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)