A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Read frome .txt

Threaded View

  1. #1
    Senior Member
    Join Date
    Sep 2005
    Location
    Gothenburg, Sweden
    Posts
    357

    Read frome .txt

    Hello all at koolmoves forum...

    How do you do to load text frome a txt file into a Dynamic text in koolmoves.

    It will be mutch easier to edit and update my site if i could just change the textfile on my web hotel instead of the flash file.

    AND:

    Could somebody please re-program this to asp, tough my server doesn't read php:

    <?php

    "&data=".$var1;
    "&file=".$filename;
    $filename = $file;
    $data=stripslashes($data);

    // Let's make sure the file exists and is writable first.
    if (is_writable($filename))

    {if (!$handle = fopen($filename, 'w')) {
    echo "Cannot open file ($filename)";
    exit;
    }

    // Write $somecontent to our opened file.
    if (fwrite($handle,"&data=".$data) === FALSE) {
    echo "Cannot write to file ($filename)";
    exit;
    }

    echo "Success, wrote ($data) to file ($filename)";

    fclose($handle);

    } else {
    echo "The file $filename is not writable";
    echo $filename;
    }
    ?>
    Last edited by xzerox_xzerox; 09-13-2005 at 02:08 PM. Reason: Forgot something :P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center