Results 1 to 5 of 5
  1. #1

    Question PHP fopen question

    I am using this code to open a file from a ftp site using php i was using this code on Plesk 7.5 and it was working perfectly but now it just opens half of the file and does not generate any error. Both the sites are in the same server

    here is the code

      $filename = $domain_folder."file2.txt";
      $fp = fopen ($filename, "r") or die("Did not work");
      echo $line;
    Please Help
    I do not know whats wrong.

  2. #2
    How big is the File?
    What kind of file is it?

    Did you upgrade and it stop working or?
    <<Please see rules for signature setup>>

  3. #3
    These files are really small i mean about 29.81 KB and these files are all txt files.

    Nope i changed server since the old one got hit by the a power surge, they had plesk 8 availabe and i did not have to pay for the upgrade, so installed centos & plesk 8 and now it wont load all the contents

  4. #4
    try this
    PHP Code:
    $filename $domain_folder."file2.txt";
    $fp fopen ($filename"r") or die("Did not work");
    $line '';
      while (!
    $line .= fread($fp,100000);


  5. #5
    That worked, thanks a lot

Posting Permissions

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