简体   繁体   中英

AXUPLOADER - Insert file names into MySQL database on successful upload

I am using AXUPLOADER that I found here . I want to insert filenames into MySQL table (using mysql INSERT INTO methord for each file so that each file creates its row in the table) on successful upload.

I made a SQL insert php file, insert.php , and included it in upload.php file bundled with the package which handles file uploads, and works fine in my Windows Vista PC running PHP5 and MySQL 5.5.8 with Apache 2. But when I did it in a Windows 7 PC with same server environment, the php file is inserting a row for each MB !!

That is, suppose if I upload a file with a size of 1.8MB, two rows will be created with same data and 5 rows for 4.8 MB and so on. If i upload 5 files with 4MB size (total 20MB), 40 rows will be inserted!.

The modified upload.php file is lengthy, so that I cant paste it here in Stack Overflow. HERE is the script.

It will be helpful if somebody give me a solution. More details will be provided if needed.

因为它以1 mb的块上传文件,所以才插入很多

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM