Assuming all of the following code is correct, can anyone figure out why the file isn't being written?
// Find out if the SiteURL exists already:
$i = (0) ;
while ($i < $SubCatCount) {
$CatFile = ($SubCat[$i] . ".dry") ;
$SpamCheck = file ($CatFile) ;
$SpamCheckCount = count ($SpamCheck) ;
$SpamCheckLoop = (0) ;
while ($SpamCheckLoop < $SpamCheckCount) {
if (eregi ($SiteURL, $SpamCheck[$SpamCheckLoop])) {
$SpamFlag[$i] = (1) ;
}
++$SpamCheckLoop ;
}
if ($SpamFlag[$i] == 0) {
$Submission = ("[!!]" . $Name . "[!!]" . $Email . "[!!]!" . $SiteName . "[!!]" . $SiteURL . "[!!]" . $Description . "[!!]" . $Keyword[0] . "[!!]" . $Keyword[1] . "[!!]" . $Keyword[2] . "[!!]" . $Keyword[3] . "[!!]" . $Keyword[4] . "[!!]" . $Keyword[5] . "[!!]" . $SubCatName[$SubCat[$i]] . "\r\n") ;
$fp = fopen($CatFile , "a+") ;
$fw = fwrite($fp, $Submission) ;
fclose($fp) ;
}
++$i ;
}
I've had problems with executing functions from within loops in other languages, and was wondering if this might be the same deal?
Thanks,
Eric