PHP Upload Script - Files uploaded Corrupt
Matthew Benjamin
msbenjamin12 at gmail.com
Fri Aug 18 20:10:36 UTC 2006
On 8/17/06, Ed K. <ed at hp.uab.edu> wrote:
>
> On Wed, 16 Aug 2006, Matthew Benjamin wrote:
> >
> > Can anyone help I have a php script that uploads files to a mysql
> database.
> > When it uploads the files all of the content in the file gets corrupted.
> Has
> > anyone expirienced this. I know I can't be the first person with the
> > problem. -- Help!!! Please.
> >
>
> Are you escaping the data from the file?
>
> here would be a working php script:
>
> $fp=fopen($addfile,"r");
> $bvar=fread($fp,filesize($addfile));
> fclose($fp);
> $bvar=addslashes($bvar);
> $q="insert into table (file) values ('$bvar')";
>
> ed
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
no worky...
--
mB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20060818/c5f37100/attachment-0002.html
More information about the users
mailing list