Assign variable from text file?

Discussion in 'jQuery' started by enricosx, Mar 8, 2016.

  1. #1
    hello, i have a text file with one line (numeric), i search a simple way to ready this value and assign to a variable.
    please help me :)
     
    enricosx, Mar 8, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    $var = file_get_contents('filename.fileextension'); //works if it's only one single file in that file
     
    PoPSiCLe, Mar 8, 2016 IP