Changeset 61 for branches


Ignore:
Timestamp:
Aug 31, 2019 7:02:12 PM (6 years ago)
Author:
anonymous
Message:

fix error in fopen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testa-single-bookmark/php/func.php

    r51 r61  
    4848function input_file( $fname ) {
    4949        $file = fopen($fname, "r");
    50         $content = fread( $file, filesize($fname) );
    51         fclose($file);
    52 
     50    $content = "";
     51    if( $file !== FAlSE ){
     52        $content = fread( $file, filesize($fname) );
     53        fclose($file);
     54    }
    5355        return $content;
    5456}
Note: See TracChangeset for help on using the changeset viewer.