hi,
i try to store html-files in an odbc-database created with access97. the type of the field with the html-text is a memo. after i fixed the problem with the ' in my sql-query, the upload works fine (i thought), but now i realized that almost every file is cut at about the same position!
is this a size restriction of the memo-field? or does php4 have any restrictions concerning the size of uploaded files?
here is the source-code of the upload:
$contents=addslashes(fread(fopen($filename, "r"), filesize($filename)));
#to fix the ' problem
$contents=ereg_replace("'","&NULL;", $contents);
$loc=($key+1)/3;
$query="insert into newsdata (body) values('$contents')";
odbc_exec($dbh,$query);
and that's how i read it:
$body=stripslashes(odbc_result($res,1));
$body=ereg_replace("&NULL", "'", $body);
echo $body;
could naybody give me an advice? or tell me another way to store html-files in databases?
thanx