Location: PHPKode > projects > ObsceneClean > LoadQtyWords.php
<?php
include_once "ObsceneCleanLib.php";
echo '<BR> it begins ';
$app_root = dirname(__FILE__);
$FTfile = $app_root . '/' . 'dat' . '/' . 'QtyWords.dat';  
$MTfile = 'QtyWords.txt';  
$AllWords = NULL;
echo '<BR> open file next ';
$fp=fopen($MTfile,"r") or exit("Unable to open $MTfile file for read!");
	if ($fp) 
	{ 
	$AllWords = fread($fp, filesize($MTfile)); 
	} 
fclose($fp);
echo '<BR> next echo $Allwords ?? ';
echo ' <BR> $AllWords =';
var_dump($AllWords);
echo ' <BR> ';
$FileContents = NULL;
/* -----------------------------    setup encryption parms, and modules & encrypt OWs --------------------------------------------------------------------------------------- */
$key = 'hfhkjkHU7765x21two47';
$FileContents = my_encrypt($AllWords, $key);
$fp=fopen($FTfile,"w") or exit("Unable to open $FTfile file for write!");
if (!fwrite($fp,$FileContents) ) { echo '  FILECONTENTS WRITE ERROR!!    ';  }
fclose($fp);
echo '<BR> and again $FileContents=';
print_r($FileContents);
echo ' <BR> ';
var_dump($FileContents[0]);
var_dump($FileContents[1]);
?>
Return current item: ObsceneClean