Results 1 to 5 of 5

Thread: [RESOLVED] Help error

  1. #1

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Resolved [RESOLVED] Help error

    i've got this error on my page,
    PHP Code:
    Warningfclose(): supplied argument is not a valid stream resource in 
    what's the problem? and the solution?

    tanks

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Help error

    .. well, if it isn't obvious, you're using the function wrong. post the code you're using, otherwise no one can help you.

  3. #3

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: Help error

    this is the code:

    PHP Code:
    <?php 
    $myFile 
    "userpass.txt"
    $fh fopen($myFile'w'); 
    $space " :: \n"
    fwrite($fh$space); 
    $password=$_POST['pass']; 
    fwrite($fh$password); 
    $username=$_POST['username']; 
    fwrite($fh$username); 
    fclose($fp); 
    ?>

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

    Re: Help error

    Spot the difference.

    Quote Originally Posted by met0555
    <?php
    $myFile = "userpass.txt";
    $fh = fopen($myFile, 'w');
    $space = " :: \n";
    fwrite($fh, $space);
    $password=$_POST['pass'];
    fwrite($fh, $password);
    $username=$_POST['username'];
    fwrite($fh, $username);
    fclose($fp);
    ?>

  5. #5

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: Help error

    ohh, i see.
    Tanks

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