"Phil Powell" <[EMAIL PROTECTED]> wrote in message
021801c2af19$e05909d0$2aaf6244@scandinawa1bo6">news:021801c2af19$e05909d0$2aaf6244@scandinawa1bo6...
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 = "\n";
    $nicks = explode("\n", $stuff);

<--snip-->

I would recommend you to always check if the file was opened successfully.
Simply add this after your fopen..
if ($fileID === false) {                             // 3 '=' signs checks
variable type and value
    die("Error opening file. $php_errormsg");             // you will need
track_errors = ON in php.ini to use $php_errormsg.

HTN

gamin.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to