Location: PHPKode > projects > PHP Newsgroup Reader > file_open.inc
<?
                           ++$num_file;
                           $file_exist = false;

                           for ($i=0;$i<strlen($file_name[$num_file])-1;++$i)
                           {
                                   if ( $file_name[$num_file][$i]==' ' )
                                           $file_name[$num_file][$i] = '_';
                                   if ( $file_name[$num_file][$i]=='?' )
                                           $file_name[$num_file][$i] = '_';

                           }
$file_name[$num_file] = strtolower($file_name[$num_file]);
$replace1 = array(' ', '"', '\'', '<', '>', chr(13), chr(10));
$replace2 = array('&#32;', "&quot;", "&quot;", "&lt;", "&gt;", '', '');
$newsgroup = str_replace($replace1, $replace2, $newsgroup);
                           if ( !file_exists("file/".$server."/".$file_name[$num_file]) )
                           {
                                   @mkdir("file",0755);
                                   @mkdir("file/".$server,0755);

                                   $file_save = fopen("file/".$server."/".$file_name[$num_file],"a");
                           }else
                                   $file_exist = true;
?>
Return current item: PHP Newsgroup Reader