hmmm...i'm trying to read a directory and then compare the results with a table in the db...so, obviously, then i can input the html files into the db...
i'm getting an error message that says -
"Warning: Argument #1 to array_diff() is not an array in ...path/index.php on line 21"
line 21 is the "$output..." line...
the search on the directory is working just great...it's returning the results i want...
suggestions?
<?
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href=\"$file\">$file</a>\n";
}
}
closedir($handle);
}
///// db connection info...
$query = mysql_query ("SELECT * FROM temp" ) or die ("Unexpected error for MySQL database [3b]");
$row_html = mysql_fetch_array($query);
$output=array_diff($file,$row_html);
?>