Results 1 to 3 of 3

Thread: read a text file from my pc??

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    12

    read a text file from my pc??

    hi all..
    this code makes me read data from a text file uploaded on server
    Code:
    $myFile = "data.txt";
    $fh = fopen($myFile, 'r');
    $theData = fread($fh, filesize($myFile));
    fclose($fh);
    echo $theData;
    if is there is a way to read a text file from my pc like:
    Code:
    $myFile = "C:/data.txt";
    $fh = fopen($myFile, 'r');
    $theData = fread($fh, filesize($myFile));
    fclose($fh);
    echo $theData;
    ?????

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: read a text file from my pc??

    No - not without uploading it first. You have to use an input[type=file] and the functions for managing uploaded files.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    12

    Re: read a text file from my pc??

    thx i'll check it out!

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