Ignore:
Timestamp:
Aug 30, 2019 6:22:57 PM (6 years ago)
Author:
anonymous
Message:

output file when it can be opens

File:
1 edited

Legend:

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

    r23 r51  
    3939function output_file( $fname , $content ) {
    4040        $file = fopen($fname, "w");
    41         fwrite( $file, $content . "\n" );
    42         fflush($file);
    43         fclose($file);
     41    if( $file !== FAlSE ){
     42        fwrite( $file, $content . "\n" );
     43        fflush($file);
     44        fclose($file);
     45    }
    4446}
    4547
Note: See TracChangeset for help on using the changeset viewer.