NYCPHP Meetup

NYPHP.org

Warning: 1 is not a valid File-Handle resource - HELP!

Phil Powell soazine at erols.com
Sun Dec 29 04:08:38 EST 2002


Ok, I am a bad coder. :(  I can't figure this out at all:

   $fileID = fopen("nicknames.txt", 'r');
    $stuff = fread($fileID, filesize("nicknames.txt")); fclose($fileID);
    if (strlen($stuff) > 0) $priorNickNewLine = "\
"; 
    $nicks = explode("\
", $stuff);

The last line produces the Warning.. why?  I am trying to read contents from nicknames.txt and split according to the newline character so that each nickname is an array element.

What did I do wrong? :(

Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20021229/8d8c0ce9/attachment.html>


More information about the talk mailing list