need help php

Discussion in 'PHP' started by Magina™, Apr 30, 2010.

  1. #1
    hi guys can you tall me what is missing? :)

    $msg = 'This is a sample msg.';
    $file = 'sss.txt';
    $fh = fopen('sss.txt','w');
    fwrite($fh,$msg);
    fclose();
     
    Magina™, Apr 30, 2010 IP
  2. m-1o

    m-1o Guest

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hello
    the error is here
    this is the true code
     
    m-1o, Apr 30, 2010 IP
  3. Chipzzz

    Chipzzz Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    Actually, it's fclose($fh);
    ;)
     
    Chipzzz, Apr 30, 2010 IP
  4. aTo

    aTo Active Member

    Messages:
    473
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    78
    #4
    here is the complete code...

    
    <?php
    
    $msg = "This is a sample msg.";
    
    $file = "sss.txt";
    
    $fh = fopen($file,"w");
    
    fwrite($fh,$msg);
    
    fclose($fh); 
    
    ?>
    
    PHP:
    hope that helps :)
     
    aTo, Apr 30, 2010 IP