Jeg har følgende lille script :
<?
include 'connect.inc.php';
$dbfile="text.db";
$table ="A";
$fcontents = file($dbfile);
while (list ($line_num, $line) = each ($fcontents)) {
if (eregi("^a", $line)) {
$line = addslashes($line);
$query = ("insert into $table (id,title) values(NULL,'$line')");
mysql_query($query) or die("<H1>Sorry!</H1>" .
"<P>Insert Failed</P>");
echo "$i - $line<br>\n";
$i++;
}
}
?>
linien echo "$i - $line<br>\n"; skriver det hele fint ud med slashes foran
de "farlige" karakterer. Men der er ingen slashes i MySQL dbasen.
Apache 1.3.20 - PHP 4.0.6 - MySQL 3.23.40.
Apache './configure' '--with-mysql' '--with-apache=../apache_1.3.20'
'--enable-track-vars' '--enable-magic-quotes'
magic_quotes_gpc = On i php.ini
jeg har osse prøvet magic_quotes_runtime = On.
men det virker simpelthen ikke.
Anyone ?
MVH/ Niels Bachmann
--
"Mandrake.... Have you ever seen a 'commie drink a glass of water?"
http://www.precious.dk